public void OnModify(BC_MATK obj) { Mouse.OverrideCursor = Cursors.Wait; try { KhaiThacDuLieuProcess processKTDL = new KhaiThacDuLieuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; ret = processKTDL.MaTK(DatabaseConstant.Action.SUA, ref obj, ref listClientResponseDetail); AfterModify(ret, obj, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
private void SetFormData() { Mouse.OverrideCursor = Cursors.Wait; try { KhaiThacDuLieuProcess processKTDL = new KhaiThacDuLieuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; obj = new BC_MATK(); obj.ID = ID; ret = processKTDL.MaTK(DatabaseConstant.Action.LOAD, ref obj, ref listClientResponseDetail); if (ret == true) { ID = obj.ID; #region Thông tin chung lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(obj.TTHAI_NVU); cmbLoaiTK.SelectedIndex = lstSourceLoaiTK.IndexOf(lstSourceLoaiTK.FirstOrDefault(i => i.KeywordStrings[0].ToString().Equals(obj.MA_LOAITK.ToString()))); txtMaTK.Text = obj.MA_LOAITK; txtTenTK.Text = obj.TEN_MATK; #endregion #region Thông tin kiểm soát txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI); raddtNgayLap.Value = LDateTime.StringToDate(obj.NGAY_NHAP, "yyyyMMdd"); txtNguoiLap.Text = obj.NGUOI_NHAP; if (LDateTime.IsDate(obj.NGAY_CNHAT, "yyyyMMdd") == true) { raddtNgayCapNhat.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, "yyyyMMdd"); } else { raddtNgayCapNhat.Value = null; } txtNguoiCapNhat.Text = obj.NGUOI_CNHAT; #endregion #region Lưu thông tin chung TTHAI_BGHI = obj.TTHAI_BGHI; TTHAI_NVU = obj.TTHAI_NVU; MA_DVI_QLY = obj.MA_DVI_QLY; MA_DVI_TAO = obj.MA_DVI_TAO; NGAY_NHAP = obj.NGAY_NHAP; NGUOI_NHAP = obj.NGUOI_NHAP; #endregion } else { CommonFunction.ThongBaoKetQua(listClientResponseDetail); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }