private void SetFormData() { Mouse.OverrideCursor = Cursors.Wait; try { NhanSuProcess processNhanSu = new NhanSuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; obj = new NS_DM_DANH_MUC(); obj.ID = id; ret = processNhanSu.DanhMuc(DatabaseConstant.Action.LOAD_DATA, ref obj, ref listClientResponseDetail); if (ret == true) { id = obj.ID; #region Thông tin chung lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(obj.TTHAI_NVU); txtMa.Text = obj.MA_DANH_MUC; txtTen.Text = obj.TEN_DANH_MUC; //txtMoTa.Text = obj.MO_TA; #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 } 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; } }
public void OnDelete() { Mouse.OverrideCursor = Cursors.Wait; try { bool ret = false; List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); NhanSuProcess processNhanSu = new NhanSuProcess(); ret = processNhanSu.DanhMuc(action, ref obj, ref listClientResponseDetail); AfterDelete(ret, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
public void OnModify(NS_DM_DANH_MUC obj) { Mouse.OverrideCursor = Cursors.Wait; try { NhanSuProcess processNhanSu = new NhanSuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; ret = processNhanSu.DanhMuc(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; } }