private void btnAddNew_Click(object sender, EventArgs e) { try { btnAddNew.UseSelectable = false; using (adduser = new FormAddUser()) { adduser.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); GC.Collect(); } finally { using (TBL_USER_DATA_ACCESS uda = new TBL_USER_DATA_ACCESS()) { dataGridViewUser.DataSource = uda.ShowUserAllIncludeInActive(); } GC.Collect(); } btnAddNew.UseSelectable = false; }
private void addBtn_Click(object sender, EventArgs e) { FormAddUser newAddForm = new FormAddUser(); newAddForm.AddFinished += AddFinsh; newAddForm.ShowDialog(); }
private void modBtn_Click(object sender, EventArgs e) { if (userDataList.Rows.Count <= 0) { return; } FormAddUser newAddForm = new FormAddUser(); newAddForm.ModFinished += ModFinsh; newAddForm.InitFormInfo((UserInfo)userDataList.SelectedRows[0].Tag); newAddForm.ShowDialog(); }
private void gunaButtonAdd_Click(object sender, EventArgs e) { Form AddUser = new FormAddUser(btnRefresh); AddUser.ShowDialog(); }