private void gridView1_DoubleClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(_departmentId)) { XtraMessageBox.Show("Bạn chưa chọn Đơn Vị cần sửa!", "THÔNG BÁO"); } else { var department = new FormUpdateDepartment(_departmentId); department.ShowDialog(); LoadDepartments(); _departmentId = null; EnableButtonUpdateAndDelete(false); } }
/// <summary> /// Update /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItemUpdate_ItemClick(object sender, ItemClickEventArgs e) { if (string.IsNullOrEmpty(_departmentId)) { XtraMessageBox.Show("Bạn chưa chọn Bộ Phận cần sửa!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Question); } else { var update = new FormUpdateDepartment(_departmentId); update.ShowDialog(); LoadDepartments(); _departmentId = null; EnableButtonUpdateAndDelete(false); } }