public FORM_USER_MANAGEMENT() { InitializeComponent(); if (frm == null) /*بعين قيمة لل form لو قيمتة ب null وهى تكون قيمتها الحالية */ // .......[4] { frm = this; } this.DGV_user.DataSource = ClaUser.GET_ALL_USER(); btn_update.Enabled = false; btn_delete.Enabled = false; btn_add_user.Enabled = true; }
private static FORM_USER_MANAGEMENT frm; // ......................[1] static void frm_formclosed(object sender, FormClosedEventArgs e) // ................[2] { frm = null; }
private void userManagementToolStripMenuItem_Click(object sender, EventArgs e) { FORM_USER_MANAGEMENT frm = new FORM_USER_MANAGEMENT(); frm.ShowDialog(); }