private void btnadd_Click(object sender, EventArgs e) { frmGhabzPardakht fgd = new frmGhabzPardakht(); //fgd.cur_date = this.cur_date; fgd.ShowDialog(); if (btnfilter.Enabled == true) { btnfilter.PerformClick(); } else { payments pm = new payments(); DataTable dt = new DataTable(); dt = pm.Select(); grdDataViewer.DataSource = dt; } }
private void صدورقبضپرداختحقوقبهاساتیدToolStripMenuItem_Click(object sender, EventArgs e) { bool IsOpen = false; foreach (Form f in Application.OpenForms) { if (f.GetType() == typeof(frmGhabzPardakht)) { IsOpen = true; f.Focus(); break; } } if (IsOpen == false) { frmGhabzPardakht fad = new frmGhabzPardakht(); fad.MdiParent = this; fad.Show(); } }