Пример #1
0
        private void toolStripButton1_Click_1(object sender, EventArgs e)
        {
            bool IsOpen = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.GetType() == typeof(frmGhabzDaryaft))
                {
                    IsOpen = true;
                    f.Focus();
                    break;
                }
            }

            if (IsOpen == false)
            {
                frmGhabzDaryaft fmi = new frmGhabzDaryaft();
                fmi.MdiParent = this;
                fmi.Show();
            }
        }
Пример #2
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            frmGhabzDaryaft fgd = new frmGhabzDaryaft();

            //fgd.cur_date = this.cur_date;
            //fgd.MdiParent = this.MdiParent;
            //int m = int.Parse(cur_date.Substring(5, 2));
            //fgd.txtlastcheck.SelectedIndex = m - 1;
            fgd.ShowDialog();

            if (btnfilter.Enabled == true)
            {
                btnfilter.PerformClick();
            }
            else
            {
                ghabz     pm = new ghabz();
                DataTable dt = new DataTable();
                dt = pm.Select();
                grdDataViewer.DataSource = dt;
            }
        }