/// <summary> /// Sau khi sửa /// </summary> /// <param name="ret"></param> private void afterModify(DC_TSUAT ret) { if (ret != null) { LMessage.ShowMessage("M.DungChung.CapNhatThanhCong", LMessage.MessageBoxType.Information); Id = ret.ID; tthaiNvu = ret.TTHAI_NVU; txtMa.Text = ret.MA_TSUAT; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(ret.TTHAI_NVU); txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguNghiepVu(ret.TTHAI_NVU); CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, null, DatabaseConstant.Function.DC_DM_TINH_THANH); tbiThongTinChung.Focus(); } else { LMessage.ShowMessage("M.DungChung.CapNhatKoThanhCong", LMessage.MessageBoxType.Error); } // Yêu cầu Unlock bản ghi cần sửa UtilitiesProcess process = new UtilitiesProcess(); List <int> listLockId = new List <int>(); listLockId.Add(Id); bool retUnlockData = process.UnlockData(DatabaseConstant.Module.DMDC, DatabaseConstant.Function.DC_DM_TINH_THANH, DatabaseConstant.Table.DC_TSUAT, DatabaseConstant.Action.SUA, listLockId); }
/// <summary> /// Sau khi từ chối /// </summary> /// <param name="ret"></param> private void afterRefuse(bool ret) { if (ret) { LMessage.ShowMessage("M.DungChung.TuChoiDuyetThanhCong", LMessage.MessageBoxType.Information); tthaiNvu = BusinessConstant.TrangThaiNghiepVu.TU_CHOI.layGiaTri(); lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(tthaiNvu); txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguNghiepVu(tthaiNvu); CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, null, DatabaseConstant.Function.DC_DM_TINH_THANH); } else { LMessage.ShowMessage("M.DungChung.TuChoiDuyetKhongThanhCong", LMessage.MessageBoxType.Warning); } // Yêu cầu unlock dữ liệu UtilitiesProcess process = new UtilitiesProcess(); List <int> listLockId = new List <int>(); listLockId.Add(Id); bool retUnlockData = process.UnlockData(DatabaseConstant.Module.DMDC, DatabaseConstant.Function.DC_DM_TINH_THANH, DatabaseConstant.Table.DC_TSUAT, DatabaseConstant.Action.TU_CHOI_DUYET, listLockId); }
/// <summary> /// Sau khi thêm mới /// </summary> /// <param name="ret"></param> private void afterAddNew(DC_TSUAT ret) { if (ret != null) { LMessage.ShowMessage("M.DungChung.ThemThanhCong", LMessage.MessageBoxType.Information); if (cbMultiAdd.IsChecked == true) { Id = 0; beforeAddNew(); } else if (!DatabaseConstant.CLOSE_DETAIL_FORM) { Id = ret.ID; tthaiNvu = ret.TTHAI_NVU; txtMa.Text = ret.MA_TSUAT; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(ret.TTHAI_NVU); txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguNghiepVu(ret.TTHAI_NVU); CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, null, DatabaseConstant.Function.DC_DM_TINH_THANH); tbiThongTinChung.Focus(); } else { onClose(); } } else { LMessage.ShowMessage("M.DungChung.ThemKhongThanhCong", LMessage.MessageBoxType.Error); } }
public void AfterAddNew(bool ret, List <DC_HAN_MUC> lstObjHM, List <ClientResponseDetail> listClientResponseDetail) { try { if (ret == true) { LMessage.ShowMessage("M.DungChung.ThemThanhCong", LMessage.MessageBoxType.Information); SetEnabledAllControls(false); tthaiNvu = lstObjHM.FirstOrDefault().TTHAI_NVU; CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, mnuMain, _function); lblTrangThai.Content = BusinessConstant.layNgonNguSuDung(lstObjHM.FirstOrDefault().TTHAI_BGHI); txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(lstObjHM.FirstOrDefault().TTHAI_BGHI); } else { CommonFunction.ThongBaoKetQua(listClientResponseDetail); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } }
public void AfterAddNew(bool ret, NS_DM_DVI_TGIAN obj, List <ClientResponseDetail> listClientResponseDetail) { try { if (ret) { LMessage.ShowMessage("M.DungChung.ThemThanhCong", LMessage.MessageBoxType.Information); if (chkThemNhieuLan.IsChecked == true) { BeforeAddNew(); } else { id = obj.ID; trangThaiNVu = obj.TTHAI_NVU; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(trangThaiNVu); txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI); BeforeViewFromDetail(); } } else { CommonFunction.ThongBaoKetQua(listClientResponseDetail); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } }
/// <summary> /// Đưa dữ liệu từ form vào object DM_PHAN_HE_GD /// </summary> /// <param name="banghi">Trạng thái bản ghi</param> /// <param name="nghiepvu">Trạng thái nghiệp vụ</param> /// <param name="nguoi_cnhap">Tên người cập nhật</param> /// <returns></returns> private Presentation.Process.DanhMucServiceRef.DM_PHAN_HE_GD LayDuLieu(BusinessConstant.TrangThaiNghiepVu nghiepvu, string nguoi_cnhat) { Presentation.Process.DanhMucServiceRef.DM_PHAN_HE_GD obj = new Presentation.Process.DanhMucServiceRef.DM_PHAN_HE_GD(); if (idPhanHeGD != 0) { obj.ID = idPhanHeGD; } obj.MA_LOAI_GDICH = txtMaLoaiGD.Text; obj.TEN_LOAI_GDICH = txtTenLoaiGD.Text; obj.TEN_TAT = txtTentat.Text; obj.MA_PHAN_HE = cmbPhanHe.SelectedValue.ToString(); obj.ID_PHAN_HE = 0; //obj.TTHAI_BGHI = cmbTrangThaiSDung.SelectedValue.ToString(); obj.TTHAI_NVU = BusinessConstant.layGiaTri(nghiepvu); obj.MA_DVI_TAO = Presentation.Process.Common.ClientInformation.MaDonVi; obj.MA_DVI_QLY = Presentation.Process.Common.ClientInformation.MaDonVi; if (!LString.IsNullOrEmptyOrSpace(nguoi_cnhat)) { obj.NGUOI_CNHAT = nguoi_cnhat; obj.NGAY_CNHAT = LDateTime.GetCurrentDate(ApplicationConstant.defaultDateTimeFormat); } else { obj.NGUOI_NHAP = Presentation.Process.Common.ClientInformation.TenDangNhap; obj.NGAY_NHAP = LDateTime.GetCurrentDate(ApplicationConstant.defaultDateTimeFormat); } return(obj); }
private void SetThongTin(DM_KHU_VUC obj) { try { idKhuVuc = obj.ID; tthaiNVu = obj.TTHAI_NVU; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(tthaiNVu); txtMaKhuVuc.Text = obj.MA_KVUC; txtNguoiDuyet.Text = obj.NGUOI_CNHAT; if (!obj.NGAY_CNHAT.IsNullOrEmptyOrSpace()) { txtNgayDuyet.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, ApplicationConstant.defaultDateTimeFormat); } txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI); action = DatabaseConstant.Action.XEM; CommonFunction.RefreshButton(Toolbar, action, tthaiNVu, mnuMain, DatabaseConstant.Function.DC_DM_KHU_VUC); SetEnabledAllControls(false); } catch (System.Exception ex) { LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error); LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } finally { } }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } BusinessConstant = await context.BusinessConstant.FirstOrDefaultAsync(m => m.ID == id); if (BusinessConstant == null) { return(NotFound()); } var isAuthorized = await authorizationService.AuthorizeAsync( User, BusinessConstant, BusinessConstantsOperations.EditBusinessConstants); if (!isAuthorized.Succeeded) { return(new ChallengeResult()); } return(Page()); }
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_PHUONG_XA(); obj.ID = id; ret = processNhanSu.PhuongXa(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); cmbQuocGia.SelectedIndex = lstSourceQuocGia.IndexOf(lstSourceQuocGia.FirstOrDefault(i => i.KeywordStrings[1].Equals(obj.FN003))); cmbTinhTP.SelectedIndex = lstSourceTinhTP.IndexOf(lstSourceTinhTP.FirstOrDefault(i => i.KeywordStrings[1].Equals(obj.FN002))); cmbQuanHuyen.SelectedIndex = lstSourceQuanHuyen.IndexOf(lstSourceQuanHuyen.FirstOrDefault(i => i.KeywordStrings[1].Equals(obj.FN001))); txtMa.Text = obj.MA; txtTen.Text = obj.TEN; 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; } }
private void tlbProccess_Click(object sender, RoutedEventArgs e) { if (sender is RibbonButton) { RibbonButton rb = (RibbonButton)sender; BusinessConstant.NGHIEP_VU_CUOI_NGAY maNghiepVu = BusinessConstant.layEnumNghiepVuCuoiNgay(rb.Tag.ToString()); OnProccess(maNghiepVu); } }
private void SetFormData() { Mouse.OverrideCursor = Cursors.Wait; //lstTSDB = new List<TDTD_TAI_SAN_DAM_BAO>(); try { DataTable dt = null; LDatatable.MakeParameterTable(ref dt); LDatatable.AddParameter(ref dt, "@INP_IDHDTC", "string", idHDTC.ToString()); DataSet ds = new TaiSanDamBaoProcess().GetHopDongTheChapTDTD(dt); if (!ds.IsNullOrEmpty() && ds.Tables.Count > 1) { dt = ds.Tables[0]; idHDTC = Convert.ToInt32(dt.Rows[0]["ID"]); txtSoHopDong.Text = dt.Rows[0]["MA_HDTC"].ToString(); txtMaKH.Text = dt.Rows[0]["MA_KHANG"].ToString(); lblTTinKHang.Content = dt.Rows[0]["TEN_KHANG"].ToString(); teldtNgayCNhat.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_HDTC"].ToString(), ApplicationConstant.defaultDateTimeFormat); txtDienGiai.Text = dt.Rows[0]["DIEN_GIAI"].ToString(); tThai_NVu = dt.Rows[0]["TTHAI_NVU"].ToString(); lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(tThai_NVu); maDviQLy = dt.Rows[0]["MA_DVI_QLY"].ToString(); maDViTao = dt.Rows[0]["MA_DVI_TAO"].ToString(); txtNguoiLap.Text = dt.Rows[0]["NGUOI_NHAP"].ToString(); if (dt.Rows[0]["NGUOI_CNHAT"] != DBNull.Value) { txtNguoiCapNhat.Text = dt.Rows[0]["NGUOI_CNHAT"].ToString(); } teldtNgayNhap.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_NHAP"].ToString(), ApplicationConstant.defaultDateTimeFormat); if (dt.Rows[0]["NGAY_CNHAT"] != DBNull.Value) { teldtNgayCNhat.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_CNHAT"].ToString(), ApplicationConstant.defaultDateTimeFormat); } txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(dt.Rows[0]["TTHAI_BGHI"].ToString()); dt = ds.Tables[1]; lstTSDB = dt.Rows.OfType <DataRow>().ToList(); raddgrDSachTSDB.ItemsSource = null; raddgrDSachTSDB.ItemsSource = lstTSDB; SetGtriTong(lstTSDB); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
private void LoadGrid() { Cursor = Cursors.Wait; try { #region Điều kiện tìm kiếm RadTreeViewItem item = tvwKhuVuc.SelectedItem as RadTreeViewItem; string loaiDonVi = item.Uid.ToString(); string maDonVi = item.Tag.ToString(); #endregion DanhMucProcess danhMucProcess = new DanhMucProcess(); DataTable dt = null; LDatatable.MakeParameterTable(ref dt); LDatatable.AddParameter(ref dt, "@USER_NAME", "String", ClientInformation.TenDangNhap); LDatatable.AddParameter(ref dt, "@MA_DVI_QLY", "String", ClientInformation.MaDonViQuanLy); LDatatable.AddParameter(ref dt, "@MA", "String", maDonVi); LDatatable.AddParameter(ref dt, "@LOAI", "String", loaiDonVi); DataSet ds = danhMucProcess.getDanhSachKhuVuc01(dt); if (ds != null && ds.Tables.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { ds.Tables[0].Rows[i]["TTHAI_NVU"] = BusinessConstant.layNgonNguNghiepVu(ds.Tables[0].Rows[i]["TTHAI_NVU"].ToString()); } grKhuVucDS.DataContext = ds.Tables[0].DefaultView; if (ds.Tables[0].Rows.Count > 0) { lblTongSo.Content = ds.Tables[0].Rows.Count; } else { lblTongSo.Content = "0"; } } else { grKhuVucDS.Items.Clear(); lblTongSo.Content = 0; } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
public void AfterSave(ApplicationConstant.ResponseStatus ret, List <ClientResponseDetail> listClientResponseDetail) { CommonFunction.ThongBaoKetQua(listClientResponseDetail); if (ret == ApplicationConstant.ResponseStatus.THANH_CONG) { TTHAI_NVU = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri(); lblLabelTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(TTHAI_NVU); CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, TTHAI_NVU, mnuMain, DatabaseConstant.Function.DC_DM_DTUONG_SODU); SetEnabledControls(false); } }
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_DVI_TGIAN(); obj.ID = id; ret = processNhanSu.DonViThoiGian(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; txtTen.Text = obj.TEN; 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; } }
private void SetFormData() { DanhMucProcess processDanhMuc = new DanhMucProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); obj = new DM_KHU_VUC(); Mouse.OverrideCursor = Cursors.Wait; try { bool ret = false; obj.ID = id; ret = processDanhMuc.KhuVuc02(DatabaseConstant.Action.LOAD, ref obj, ref listClientResponseDetail); if (ret == true) { sTrangThaiNVu = obj.TTHAI_NVU; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(sTrangThaiNVu); #region Thông tin chung cmbChiNhanh.SelectedIndex = lstSourceChiNhanh.IndexOf(lstSourceChiNhanh.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_DVI_QLY))); cmbPhongGiaoDich.SelectedIndex = lstSourcePhongGiaoDich.IndexOf(lstSourcePhongGiaoDich.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_DVI))); txtMaKhuVuc.Text = obj.MA_KVUC; txtTenKhuVuc.Text = obj.TEN_KVUC; txtTenTat.Text = obj.TEN_TAT; cmbCBQL.SelectedIndex = lstSourceCBQL.IndexOf(lstSourceCBQL.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_CBO_QLY))); #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"); } txtNguoiCapNhat.Text = obj.NGUOI_CNHAT; #endregion } else { LMessage.ShowMessage("M_ResponseMessage_HanhDong_LayDuLieuKhongThanhCong", LMessage.MessageBoxType.Warning); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); LMessage.ShowMessage("M_ResponseMessage_HanhDong_LayDuLieuKhongThanhCong", LMessage.MessageBoxType.Warning); } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
/// <summary> /// Lấy ngôn ngữ hiển thị trạng thái bản ghi /// </summary> /// <param name="trangthai">string TrangThaiBanGhi</param> /// <returns>trạng thái bản ghi</returns> public static string layNgonNguSuDung(string trangthai) { if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiBanGhi.SU_DUNG)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiBanGhi.SuDung")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiBanGhi.KHONG_SU_DUNG)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiBanGhi.KhongSuDung")); } return(""); }
/// <summary> /// Lay du lieu tu control dieu khien dua vao object /// </summary> /// <param name="obj"></param> /// <param name="banghi"></param> /// <param name="nghiepvu"></param> void LayDuLieu(ref Presentation.Process.DanhMucServiceRef.DM_TINH_TP obj, BusinessConstant.TrangThaiBanGhi banghi, BusinessConstant.TrangThaiNghiepVu nghiepvu) { obj.MA_TINHTP = txtMaSo.Text; obj.TEN_TINHTP = txtTenDayDu.Text; obj.TEN_TAT = txtTenTat.Text; obj.ID_VUNG_MIEN = int.Parse(IdVung); obj.NGAY_NHAP = LDateTime.GetCurrentDate(ApplicationConstant.defaultDateTimeFormat); obj.MA_DVI_QLY = ClientInformation.MaDonVi; obj.MA_DVI_TAO = ClientInformation.MaDonVi; obj.NGUOI_NHAP = ClientInformation.TenDangNhap; obj.TTHAI_BGHI = BusinessConstant.layGiaTri(banghi); obj.TTHAI_NVU = BusinessConstant.layGiaTri(nghiepvu); }
/// <summary> /// Lay du lieu tu control dieu khien dua vao object /// </summary> /// <param name="obj"></param> /// <param name="banghi"></param> /// <param name="nghiepvu"></param> void LayDuLieu(ref Presentation.Process.DanhMucServiceRef.DC_TSUAT obj, BusinessConstant.TrangThaiBanGhi banghi, BusinessConstant.TrangThaiNghiepVu nghiepvu) { obj.MA_TSUAT = txtMa.Text; obj.TEN_TSUAT = txtTen.Text; obj.TSUAT_LAN = Convert.ToInt32(nudLan.Value); obj.TSUAT_TGIAN_SLUONG = Convert.ToInt32(nudThoiGian.Value); obj.TSUAT_TGIAN_DVI_TINH = lstSourceTanSuat.ElementAt(cmbLoaiThoiGian.SelectedIndex).KeywordStrings.First(); obj.NGAY_NHAP = LDateTime.GetCurrentDate(ApplicationConstant.defaultDateTimeFormat); obj.MA_DVI_QLY = ClientInformation.MaDonVi; obj.MA_DVI_TAO = ClientInformation.MaDonVi; obj.NGUOI_NHAP = ClientInformation.TenDangNhap; obj.TTHAI_BGHI = BusinessConstant.layGiaTri(banghi); obj.TTHAI_NVU = BusinessConstant.layGiaTri(nghiepvu); }
public JsonResult Save(string id, string maNhnsd, string tenNhnsd, string moTa, string maDviQly, bool hanCheTruyCap) { try { string msg = ""; var obj = qtht.layNhomNSD(ClientInformation.LoaiNguoiSuDung).FirstOrDefault(e => e.ID == id.Trim().StringToInt32()); if (obj != null) { obj.MA_NHNSD = maNhnsd; obj.TEN_NHNSD = tenNhnsd; obj.MO_TA = moTa; obj.MA_DVI_QLY = maDviQly; obj.HAN_CHE_TRUY_CAP = hanCheTruyCap == true ? BusinessConstant.CoKhong.CO.layGiaTri() : BusinessConstant.CoKhong.KHONG.layGiaTri(); obj.NGAY_CNHAT = (DateTime.Today).ToString("yyyyMMdd"); if (obj.ID == 0) { obj.NGAY_NHAP = (DateTime.Today).ToString("yyyyMMdd"); } obj.NGUOI_CNHAT = ClientInformation.TenDangNhap; if (obj.ID == 0) { obj.NGUOI_NHAP = ClientInformation.TenDangNhap; } string strTtnv = string.Empty; var action = DatabaseConstant.Action.SUA; if (obj.ID == 0) { obj.NGUON_TAO_DL = "NSD"; obj.PVI_KTHAC = "K"; strTtnv = obj.TTHAI_NVU; action = DatabaseConstant.Action.THEM; } obj.TTHAI_NVU = Common.LayTrangThaiBanGhi(action, BusinessConstant.layTrangThaiNghiepVu(strTtnv)); obj.TTHAI_BGHI = BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri(); // Luôn là đã duyệt (???) obj.TTHAI_NVU = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri(); OnSave(ref msg, obj); } return(Json(msg.IsNullOrEmpty() ? Common.ResultJson.Success.LayMa() : msg, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } BusinessConstant = await _context.BusinessConstant.FirstOrDefaultAsync(m => m.ID == id); if (BusinessConstant == null) { return(NotFound()); } return(Page()); }
void LoadTabKiemSoat(DataSet ds) { DataTable dt = ds.Tables["TTIN_CTIET"]; if (dt != null && dt.Rows.Count > 0) { txtNguoiLap.Text = dt.Rows[0]["NGUOI_NHAP"].ToString(); txtNguoiCapNhat.Text = dt.Rows[0]["NGUOI_CNHAT"].ToString(); teldtNgayNhap.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_NHAP"].ToString(), ApplicationConstant.defaultDateTimeFormat); if (!dt.Rows[0]["NGAY_CNHAT"].ToString().IsNullOrEmptyOrSpace()) { teldtNgayCNhat.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_CNHAT"].ToString(), ApplicationConstant.defaultDateTimeFormat); } txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(dt.Rows[0]["TTHAI_BGHI"].ToString()); } }
public void AfterModify(bool ret, BC_MATK obj, List <ClientResponseDetail> listClientResponseDetail) { try { if (ret) { LMessage.ShowMessage("M.DungChung.CapNhatThanhCong", LMessage.MessageBoxType.Information); trangThaiNVu = obj.TTHAI_NVU; TTHAI_NVU = obj.TTHAI_NVU; TTHAI_BGHI = obj.TTHAI_BGHI; MA_DVI_QLY = obj.MA_DVI_QLY; MA_DVI_TAO = obj.MA_DVI_TAO; NGAY_NHAP = obj.NGAY_NHAP; NGUOI_NHAP = obj.NGUOI_NHAP; LOAI_BCTK = obj.LOAI_BCTK; MA_TK = obj.MATK; ID = obj.ID; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(trangThaiNVu); txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI); raddtNgayCapNhat.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); txtNguoiCapNhat.Text = ClientInformation.TenDangNhap; BeforeViewFromDetail(); } else { CommonFunction.ThongBaoKetQua(listClientResponseDetail); } // Yêu cầu Unlock bản ghi cần sửa UtilitiesProcess process = new UtilitiesProcess(); List <int> listLockId = new List <int>(); listLockId.Add(id); bool retUnlockData = process.UnlockData(DatabaseConstant.Module.DMDC, DatabaseConstant.Function.KTDL_MAPPING_MATK_CT, DatabaseConstant.Table.BC_MATK, DatabaseConstant.Action.SUA, listLockId); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } }
void LoadTabThongTinChung(DataSet ds) { DataTable dt = ds.Tables["TTIN_CTIET"]; if (dt != null) { txtSoGD.Text = TDVMDUTHU.MA_GIAO_DICH; teldtNgayGD.Value = LDateTime.StringToDate(dt.Rows[0]["NGAY_GIAO_DICH"].ToString(), ApplicationConstant.defaultDateTimeFormat); teldtDuThuDenNgay.Value = LDateTime.StringToDate(dt.Rows[0]["DTHU_DEN_NGAY"].ToString(), ApplicationConstant.defaultDateTimeFormat); numTyLe.Value = Convert.ToDouble(dt.Rows[0]["TY_LE"]); txtDienGiai.Text = dt.Rows[0]["DIEN_GIAI"].ToString(); lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(dt.Rows[0]["TTHAI_NVU"].ToString()); iDGiaoDich = Convert.ToInt32(dt.Rows[0]["ID"]); } dt = ds.Tables["KHE_UOC"]; if (dt != null && dt.Rows.Count > 0) { lstDuThu = new List <DANH_SACH_KHE_UOC_DU_THU>(); foreach (DataRow dr in dt.Rows) { DANH_SACH_KHE_UOC_DU_THU objDSKUoc = new DANH_SACH_KHE_UOC_DU_THU(); foreach (DataColumn dc in dt.Columns) { PropertyInfo proper = objDSKUoc.GetType().GetProperty(dc.ColumnName); if (proper != null) { if (proper.PropertyType == typeof(decimal)) { proper.SetValue(objDSKUoc, Convert.ToDecimal(dr[dc.ColumnName]), null); } else if (proper.PropertyType == typeof(int)) { proper.SetValue(objDSKUoc, Convert.ToInt32(dr[dc.ColumnName]), null); } else if (proper.PropertyType == typeof(string)) { proper.SetValue(objDSKUoc, Convert.ToString(dr[dc.ColumnName]), null); } } } lstDuThu.Add(objDSKUoc); } LoadGridKheUoc(); } }
private void LoadDuLieu() { lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(objHeThong.HTTKTHCT.TTHAI_NVU); txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(objHeThong.HTTKTHCT.TTHAI_BGHI); txtMaHeThongTaiKhoan.Text = objHeThong.HTTKTHCT.MA_HT_TKTH; txtTenHeThongTaiKhoan.Text = objHeThong.HTTKTHCT.TEN_HT_TKTH; dtNgayHieuLuc.Value = LDateTime.StringToDate(objHeThong.HTTKTHCT.NGAY_ADUNG, ApplicationConstant.defaultDateTimeFormat); if (!objHeThong.HTTKTHCT.NGAY_HET_HLUC.IsNullOrEmptyOrSpace()) { dtNgayHetHieuLuc.Value = LDateTime.StringToDate(objHeThong.HTTKTHCT.NGAY_HET_HLUC, ApplicationConstant.defaultDateTimeFormat); } txtNguoiLap.Text = objHeThong.HTTKTHCT.NGUOI_NHAP; txtNguoiCapNhat.Text = objHeThong.HTTKTHCT.NGUOI_CNHAT; raddtNgayNhap.Value = LDateTime.StringToDate(objHeThong.HTTKTHCT.NGAY_NHAP, ApplicationConstant.defaultDateTimeFormat); if (!objHeThong.HTTKTHCT.NGAY_CNHAT.IsNullOrEmptyOrSpace()) { raddtNgayCNhat.Value = LDateTime.StringToDate(objHeThong.HTTKTHCT.NGAY_CNHAT, ApplicationConstant.defaultDateTimeFormat); } }
public void LoadForm(bool bBool) { //STT,ID,MA_TSUAT,TEN_TanSuat,TEN_TAT,MA_MIEN,TEN_MIEN,MA_VUNG,TEN_VUNG,TTHAI_BGHI,TTHAI_NVU,NGAY_NHAP,NGUOI_NHAP,NGAY_CNHA,NGUOI_CNHA,KEY Id = int.Parse(LstChiTiet[1].ToString()); txtMa.IsEnabled = false; lblTrangThai.Content = LstChiTiet[10].ToString(); txtTrangThaiBanGhi.Text = LstChiTiet[9].ToString(); if (!LstChiTiet[11].ToString().IsNullOrEmptyOrSpace()) { txtNgayLap.Value = LDateTime.StringToDate(LstChiTiet[11].ToString(), "yyyyMMdd"); } if (!LstChiTiet[13].ToString().IsNullOrEmptyOrSpace()) { txtNgayDuyet.Value = LDateTime.StringToDate(LstChiTiet[13].ToString(), "yyyyMMdd"); } txtNguoiLap.Text = LstChiTiet[12].ToString(); txtNguoiDuyet.Text = LstChiTiet[14].ToString(); //Sua(bBool); lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(lblTrangThai.Content.ToString()); }
public void AfterModify(bool ret, List <DC_HAN_MUC> lstObjHM, List <ClientResponseDetail> listClientResponseDetail) { if (ret == true) { LMessage.ShowMessage("M.DungChung.SuaThanhCong", LMessage.MessageBoxType.Information); SetEnabledAllControls(false); tthaiNvu = lstObjHM.FirstOrDefault().TTHAI_NVU; CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, mnuMain, _function); lblTrangThai.Content = BusinessConstant.layNgonNguSuDung(lstObjHM.FirstOrDefault().TTHAI_BGHI); txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(lstObjHM.FirstOrDefault().TTHAI_BGHI); teldtNgayCNhat.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); txtNguoiCapNhat.Text = ClientInformation.TenDangNhap; } else { CommonFunction.ThongBaoKetQua(listClientResponseDetail); } }
/// <summary> /// Lấy ngôn ngữ hiển thị trạng thái nghiệp vụ /// </summary> /// <param name="trangthai">string TrangThaiNghiepVu</param> /// <returns>trạng thái nghiệp vụ</returns> public static string layNgonNguNghiepVu(string trangthai) { if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.LUU_TAM)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.LuuTam")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.CHO_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.ChoDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.SUA_SAU_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.SuaSauDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.DA_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.DaDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.TU_CHOI)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.TuChoi")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.THOAI_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.ThoaiDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.LUU_TAM_SUA_SAU_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.LuuTamSuaSauDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.TU_CHOI_SUA_SAU_DUYET)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.TuChoiSuaSauDuyet")); } else if (trangthai == BusinessConstant.layGiaTri(BusinessConstant.TrangThaiNghiepVu.TU_CHOI_CAP_TIN_DUNG)) { return(LanguageNode.GetValueUILanguage("U.DungChung.TrangThaiNghiepVu.TuChoi")); } return(""); }
public void OnSave() { if (!Validation()) { return; } GetFormData(ref objHDTC, BusinessConstant.layTrangThaiNghiepVu(tThai_NVu)); TaiSanDamBaoProcess processTSDB = new TaiSanDamBaoProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; if (idHDTC == 0) { ret = processTSDB.HopDongTheChapTDTD(DatabaseConstant.Action.THEM, ref objHDTC, ref listClientResponseDetail); } else { ret = processTSDB.HopDongTheChapTDTD(DatabaseConstant.Action.SUA, ref objHDTC, ref listClientResponseDetail); } AfterSave(ret, listClientResponseDetail); }
public void SetDataForm(int id) { try { idKhuVuc = id; DM_KHU_VUC obj = new DanhMucProcess().getKhuVucById(idKhuVuc); if (!LObject.IsNullOrEmpty(obj)) { tthaiNVu = obj.TTHAI_NVU; txtMaKhuVuc.Text = obj.MA_KVUC; txtTenKhuVuc.Text = obj.TEN_KVUC; txtTenTat.Text = obj.TEN_TAT; lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(tthaiNVu); cmbDonVi.SelectedIndex = lstSourcePGD.IndexOf(lstSourcePGD.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_DVI))); txtNguoiLap.Text = obj.NGUOI_NHAP; txtNgayLap.Value = LDateTime.StringToDate(obj.NGAY_NHAP, ApplicationConstant.defaultDateTimeFormat); txtNguoiDuyet.Text = obj.NGUOI_CNHAT; if (!obj.NGAY_CNHAT.IsNullOrEmptyOrSpace()) { txtNgayDuyet.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, ApplicationConstant.defaultDateTimeFormat); } txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI); if (action.Equals(DatabaseConstant.Action.SUA)) { SetEnabledAllControls(true); } else { SetEnabledAllControls(false); } CommonFunction.RefreshButton(Toolbar, action, tthaiNVu, mnuMain, DatabaseConstant.Function.DC_DM_KHU_VUC); } } catch (System.Exception ex) { LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error); LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
/// <summary> /// Sự kiện load dữ liệu lên form /// </summary> private void LoadForm() { DanhMucProcess danhmucProcess = new DanhMucProcess(); Mouse.OverrideCursor = Cursors.Wait; try { if (idPhanHeGD != 0) { //Sự kiện load dữ liệu DataSet dsPhanHeGD = danhmucProcess.getDanhSachPhanHeGDTheoID(idPhanHeGD); if (dsPhanHeGD != null && dsPhanHeGD.Tables.Count > 0) { DataTable dtPhanHeGD = danhmucProcess.getDanhSachPhanHeGDTheoID(idPhanHeGD).Tables[0]; if (dtPhanHeGD.Rows.Count > 0) { lblTrangThai.Content = BusinessConstant.layTrangThaiNghiepVu(dtPhanHeGD.Rows[0]["TTHAI_NVU"].ToString()); txtMaLoaiGD.Text = dtPhanHeGD.Rows[0]["MA_LOAI_GDICH"].ToString(); txtNgayDuyet.Text = dtPhanHeGD.Rows[0]["NGAY_CNHAT"].ToString(); txtNgayLap.Text = dtPhanHeGD.Rows[0]["NGAY_NHAP"].ToString(); txtTenLoaiGD.Text = dtPhanHeGD.Rows[0]["TEN_LOAI_GDICH"].ToString(); txtTentat.Text = dtPhanHeGD.Rows[0]["TEN_TAT"].ToString(); txtTrangThaiBanGhi.Text = dtPhanHeGD.Rows[0]["TTHAI_BGHI"].ToString(); txtNguoiDuyet.Text = dtPhanHeGD.Rows[0]["NGUOI_CNHAT"].ToString(); txtNguoiLap.Text = dtPhanHeGD.Rows[0]["NGUOI_NHAP"].ToString(); cmbPhanHe.SelectedIndex = lstSourcePhanHe.IndexOf(lstSourcePhanHe.FirstOrDefault(i => i.KeywordStrings.First().Equals(dtPhanHeGD.Rows[0]["MA_PHAN_HE"].ToString()))); cmbTrangThaiSDung.SelectedIndex = lstSourceTrangThai.IndexOf(lstSourceTrangThai.FirstOrDefault(i => i.KeywordStrings.First().Equals(dtPhanHeGD.Rows[0]["TTHAI_BGHI"].ToString()))); } } } } catch (System.Exception ex) { LMessage.ShowMessage("M.DanhMuc.ucPhanHeGDCT.LoiLoadDuLieu", LMessage.MessageBoxType.Error); LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } Mouse.OverrideCursor = Cursors.Arrow; }