/// <summary> /// Xử lý sự kiện sửa /// </summary> private void Sua() { if (grDanhSach.SelectedItems.Count == 1) { try { DataRow dr = (DataRow)grDanhSach.SelectedItems.First(); ucPhanHeGDCT ct = new ucPhanHeGDCT(); ct.idPhanHeGD = Convert.ToInt32(dr[1]); ct.trangThaiNV = dr[6].ToString(); ct.formCase = "MANAGE"; Window window = new Window(); window.Content = ct; window.WindowStartupLocation = WindowStartupLocation.CenterScreen; window.ShowDialog(); } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } } else { LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning); } }
/// <summary> /// Xử lý sự kiện thêm /// </summary> private void Them() { try { ucPhanHeGDCT ct = new ucPhanHeGDCT(); ct.formCase = "MANAGE"; Window window = new Window(); window.Content = ct; window.WindowStartupLocation = WindowStartupLocation.CenterScreen; window.ShowDialog(); } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }