using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using ajans.class_ajans;

namespace ajans.forms
{
    public partial class frm_eshterak : Telerik.WinControls.UI.RadForm
    {
        public frm_eshterak()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            pbar1.Visible = true;
            if (pbar1.Value1 <= 60)
                pbar1.Value1 += 10;
            if (pbar1.Value2 <= 95)
                pbar1.Value2 += 5;
            if (pbar1.Value2 == 100)
                pbar1.Visible = false;
            gpanel.Visible = true;
        }

        private void btn_search_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void btn_home_Click(object sender, EventArgs e)
        {
            frm_main fm = new frm_main();
            fm.Show();
            this.Hide();
        }

        private void frm_eshterak_Load(object sender, EventArgs e)
        {
            eshterak es = new eshterak();
            dg_eshterak.DataSource = es.show();
        }

        private void btn_insert_Click(object sender, EventArgs e)
        {
            frm_darj_eshterak fde = new frm_darj_eshterak();
            dg_eshterak.DataSource = fde.ShowDialog();
            frm_eshterak_Load(null, null);

        }

            }
}
