public GDKT_SO_TIEN_GUI_NGAN_HANG() { InitializeComponent(); LoadCombobox(); if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtDenNgay.Value = raddtNgayBaoCao.Value = raddtTuNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); cmbChiNhanh.SelectionChanged += new SelectionChangedEventHandler(cmbChiNhanh_SelectionChanged); cmbPhongGD.SelectionChanged += new SelectionChangedEventHandler(cmbPhongGD_SelectionChanged); }
public GDKT_SO_NHAT_KY_THU() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfMonth(); raddtDenNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetLastDateOfMonth(); // LDateTime.GetFirstDateOfMonth() }
public ucSoPhuTienGui() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); raddtDenNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); }
private void GetValuesOnForm() { DateTime dtNgayDauThang = new DateTime(); DateTime dtNgayCuoiThang = new DateTime(); int iMonth = Convert.ToDateTime(raddtThangBaoCao.Value).Month; int iYear = Convert.ToDateTime(raddtThangBaoCao.Value).Year; dtNgayDauThang = LDateTime.GetFirstDateOfMonth(iYear, iMonth); dtNgayCuoiThang = LDateTime.GetLastDateOfMonth(iYear, iMonth); machinhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First(); maphonggd = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.First(); tungay = dtNgayDauThang.ToString(ApplicationConstant.defaultDateTimeFormat); denngay = dtNgayCuoiThang.ToString(ApplicationConstant.defaultDateTimeFormat); ngaybaocao = ClientInformation.NgayLamViecHienTai; ngonngu = lstSourceNgonNgu.ElementAt(cmbNgonNgu.SelectedIndex).KeywordStrings.First(); dinhdang = lstSourceDinhDang.ElementAt(cmbDinhDang.SelectedIndex).KeywordStrings.First(); thangbaocao = Convert.ToDateTime(raddtThangBaoCao.Value).ToString("yyyyMM"); }
public BCTH_TH_LICH_SU() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtNgayChotSoLieu.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); raddtNgayBaoCao.Value = DateTime.Now; }
private void LayDuLieu() { Mouse.OverrideCursor = Cursors.Wait; try { if (txtMaGiaoDich.Text.IsNullOrEmptyOrSpace()) { return; } DataTable dt = null; LDatatable.MakeParameterListTable(ref dt); LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap); LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text); DataSet ds = new HoTroProcess().LayDuLieu(dataQueryGet, dt); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { raddtNgayGiaoDich.Value = LDateTime.StringToDate(ds.Tables[0].Rows[0]["NGAY_GDICH"].ToString(), "yyyyMMdd"); txtDienGiai.Text = ds.Tables[0].Rows[0]["DIEN_GIAI"].ToString(); string maDonVi = ds.Tables[0].Rows[0]["MA_DVI"].ToString(); string maNguonVon = ds.Tables[0].Rows[0]["NV_LOAI_NVON"].ToString(); LoadComboBoxNguonVon(maDonVi); cmbNguonVon.SelectedIndex = lstSourceNguonVon.IndexOf(lstSourceNguonVon.FirstOrDefault(i => i.KeywordStrings.First().Equals(maNguonVon))); raddgrHachToan.ItemsSource = ds.Tables[0].DefaultView; } else { raddgrHachToan.ItemsSource = null; } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); CommonFunction.ThongBaoLoi(ex); } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
private void SetEnableControl() { if (lstDuLieuHinhAnh == null || lstDuLieuHinhAnh.Count == 0) { lblImageName.Content = ""; btnBack.IsEnabled = false; btnNext.IsEnabled = false; btnShow.IsEnabled = false; } else { string imageName = lstDuLieuHinhAnh[_currentIndex].MaHinhAnh; string imageDate = LDateTime.StringToDate(lstDuLieuHinhAnh[_currentIndex].NgayHieuLuc, ApplicationConstant.defaultDateTimeFormat).ToString("dd/MM/yyyy"); string content = imageName + " [" + imageDate + "]"; if (_currentIndex == -1) { btnBack.IsEnabled = false; btnNext.IsEnabled = false; btnShow.IsEnabled = false; } else if (_currentIndex == 0) { lblImageName.Content = content; btnBack.IsEnabled = false; btnNext.IsEnabled = true; btnShow.IsEnabled = true; } else if (_currentIndex == lstDuLieuHinhAnh.Count - 1) { lblImageName.Content = content; btnBack.IsEnabled = true; btnNext.IsEnabled = false; btnShow.IsEnabled = true; } else { lblImageName.Content = content; btnBack.IsEnabled = true; btnNext.IsEnabled = true; btnShow.IsEnabled = true; } } }
void btnThemTyGia_Click(object sender, RoutedEventArgs e) { AutoCompleteEntry auLoaiTyGia = lstSourceLoaiTyGia.ElementAt(cbbLoaiTyGia.SelectedIndex); AutoCompleteEntry auHinhThucTyGia = lstSourceHinhThucNiemYet.ElementAt(cbbHinhThucNiemYet.SelectedIndex); AutoCompleteEntry auLoaiTien = lstSourceLoaiTien.ElementAt(cbbMaTienTe.SelectedIndex); DANH_SACH_TY_GIA_CT objTyGiaCT = new DANH_SACH_TY_GIA_CT(); List <DANH_SACH_TY_GIA_CT> lstTyGiaCT = new List <DANH_SACH_TY_GIA_CT>(); objTyGiaCT.ID_TY_GIA_CT = 0; objTyGiaCT.LOAI_TY_GIA = auLoaiTyGia.KeywordStrings.FirstOrDefault(); objTyGiaCT.HINH_THUC_NIEM_YET = auHinhThucTyGia.KeywordStrings.FirstOrDefault(); objTyGiaCT.MA_DVI_QLY = ClientInformation.MaDonViQuanLy; objTyGiaCT.MA_DVI_TAO = ClientInformation.MaDonViGiaoDich; objTyGiaCT.MA_LOAI_TIEN = auLoaiTien.KeywordStrings.FirstOrDefault(); objTyGiaCT.NGAY_AP_DUNG = LDateTime.DateToString(raddtNgayApDung.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat); objTyGiaCT.NGAY_NHAP = ClientInformation.NgayLamViecHienTai; objTyGiaCT.NGUOI_NHAP = ClientInformation.TenDangNhap; objTyGiaCT.TEN_LOAI_TIEN = auLoaiTien.DisplayName; objTyGiaCT.TTHAI_DL = "T"; objTyGiaCT.TY_GIA_BAN = (decimal)txtTyGiaBan.Value.GetValueOrDefault(); objTyGiaCT.TY_GIA_BQUAN = (decimal)txtTyGiaBinhQuan.Value.GetValueOrDefault(); objTyGiaCT.TY_GIA_MUA = (decimal)txtTyGiaMua.Value.GetValueOrDefault(); objTyGiaCT.TRANG_THAI_BAN_GHI = BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri(); objTyGiaCT.TRANG_THAI_NGHIEP_VU = BusinessConstant.TrangThaiNghiepVu.CHO_DUYET.layGiaTri(); if (LObject.IsNullOrEmpty(raddgrDSTyGia.ItemsSource)) { lstTyGiaCT.Add(objTyGiaCT); } else { lstTyGiaCT = raddgrDSTyGia.ItemsSource as List <DANH_SACH_TY_GIA_CT>; int icount = lstTyGiaCT.Where(f => f.HINH_THUC_NIEM_YET == objTyGiaCT.HINH_THUC_NIEM_YET && !f.TRANG_THAI_NGHIEP_VU.Equals(BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri())).Count(); if (icount > 0) { return; } else { lstTyGiaCT.Add(objTyGiaCT); } } raddgrDSTyGia.ItemsSource = lstTyGiaCT; raddgrDSTyGia.Rebind(); }
private void ResetForm() { txtSoHopDong.Text = ""; txtMaKH.Text = ""; teldtNgayHopDong.Value = ClientInformation.NgayLamViecHienTai.StringToDate(ApplicationConstant.defaultDateTimeFormat); txtDienGiai.Text = ""; lblTTinKHang.Content = ""; objHDTC = new TDTD_HOP_DONG_TCHAP(); lstTSDB = new List <DataRow>(); raddgrDSachTSDB.ItemsSource = null; raddgrDSachTSDB.ItemsSource = lstTSDB; lstIDXoa = new List <int>(); maDViTao = ""; maDviQLy = ClientInformation.MaDonVi; //if (formCase.Equals("PLUC_HD")) //{ // txtSoHopDong.IsEnabled = true; // txtSoHopDong.Margin = new Thickness(0, 0, 35, 0); // btnSoHopDong.Visibility = Visibility.Visible; // cmbLoaiHD.IsEnabled = false; // txtMaKH.IsEnabled = false; // btnMaKH.IsEnabled = false; // teldtNgayHieuLuc.IsEnabled = false; // dtpNgayHieuLuc.IsEnabled = false; // txtBenBaoLanh.IsEnabled = false; // btnBenBL.IsEnabled = false; //} //else //{ // txtSoHopDong.IsEnabled = false; // txtSoHopDong.Margin = new Thickness(0, 0, 0, 0); // btnSoHopDong.Visibility = Visibility.Collapsed; //} tThai_NVu = ""; lblTrangThai.Content = ""; txtNguoiCapNhat.Text = ""; txtNguoiLap.Text = ClientInformation.TenDangNhap; teldtNgayCNhat.Value = null; teldtNgayNhap.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); txtTrangThai.Text = ""; SetGtriTong(null); action = DatabaseConstant.Action.THEM; CommonFunction.RefreshButton(Toolbar, action, tThai_NVu, mnuMain, DatabaseConstant.Function.TDTD_HDTC_CT); }
private void tlbTongHop_Click(object sender, RoutedEventArgs e) { try { AutoCompleteEntry auBaoCao = listBaoCao.ElementAt(cmbLoaiBieu.SelectedIndex); AutoCompleteEntry auChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex); AutoCompleteEntry auPhongGD = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex); List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>(); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaBaoCao", auBaoCao.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", LDateTime.DateToString(raddtNgayChotSoLieu.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", auChiNhanh.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGD", auPhongGD.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@DinhKy", "1", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@DonViTinh", numDonViTinh.Value.GetValueOrDefault().ToString(), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); // Chuẩn bị điều kiện cho báo cáo if (listThamSoBaoCao != null && listThamSoBaoCao.Count > 0) { foreach (HT_BAOCAO_TSO htBaoCaoTso in lstHtBaoCaoTso) { foreach (ThamSoBaoCao thamSoBaoCao in listThamSoBaoCao) { if (htBaoCaoTso.MA_TSO.Equals(thamSoBaoCao.MaThamSo) && htBaoCaoTso.LOAI_TSO.Equals(thamSoBaoCao.LoaiThamSo)) { htBaoCaoTso.GTRI_TSO = thamSoBaoCao.GiaTriThamSo; break; } } } } ds = process.LayDuLieuBaoCaoTKe(idBaoCao, maBaoCao, ref objBieuMau, htBaoCao, lstHtBaoCaoTso); BuildData(); } catch (System.Exception ex) { Mouse.OverrideCursor = Cursors.Arrow; CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } finally { } }
public NSTL_DANH_SACH_NHAN_VIEN() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtNgayDuLieu.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); LoadGrid(); }
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); } }
private void ResetForm() { //Biến obj = null; id = 0; //Thông tin chung lblTrangThai.Content = ""; txtMa.Text = ""; txtTen.Text = ""; txtMoTa.Text = ""; //Thông tin kiểm soát txtTrangThaiBanGhi.Text = ""; raddtNgayLap.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); txtNguoiLap.Text = ClientInformation.TenDangNhap; raddtNgayCapNhat.Value = null; txtNguoiCapNhat.Text = ""; }
private void GetFormValues() { lstChiNhanh = new List <string>(); lstNguonVon = new List <string>(); foreach (AutoCompleteCheckBox auChiNhanh in lstSourceChiNhanh) { if (auChiNhanh.CheckedMember) { lstChiNhanh.Add(auChiNhanh.ValueMember[0]); } } foreach (AutoCompleteCheckBox auNguonVon in lstSourceNguonVon) { if (auNguonVon.CheckedMember) { lstNguonVon.Add(auNguonVon.ValueMember[0]); } } machinhanh = ""; ngayChotDLieu = LDateTime.DateToString((DateTime)raddtThangChot.Value, ApplicationConstant.defaultDateTimeFormat); ngaydaunam = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfYear().ToString(ApplicationConstant.defaultDateTimeFormat); ngaybaocao = LDateTime.DateToString((DateTime)raddtNgayBaoCao.Value, ApplicationConstant.defaultDateTimeFormat); mangonngu = lstSourceNgonNgu.ElementAt(cmbNgonNgu.SelectedIndex).KeywordStrings.First(); madinhdang = lstSourceDinhDang.ElementAt(cmbDinhDang.SelectedIndex).KeywordStrings.First(); tenchinhanh = ""; dinhKyBC = cmbDinhKy.SelectedValue.ToString(); quyBCao = radQuyBaoCao.Value.ToString(); if (dinhKyBC.Equals("THANG")) { tungay = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfMonth().ToString(ApplicationConstant.defaultDateTimeFormat); ngayChotDLieu = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetLastDateOfMonth().ToString(ApplicationConstant.defaultDateTimeFormat); } else if (dinhKyBC.Equals("QUY")) { tungay = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfQuarter().ToString(ApplicationConstant.defaultDateTimeFormat); ngayChotDLieu = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetLastDateOfQuarter().ToString(ApplicationConstant.defaultDateTimeFormat); } else if (dinhKyBC.Equals("NAM")) { tungay = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfYear().ToString(ApplicationConstant.defaultDateTimeFormat); ngayChotDLieu = ngayChotDLieu.StringToDate(ApplicationConstant.defaultDateTimeFormat).GetLastDateOfYear().ToString(ApplicationConstant.defaultDateTimeFormat); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (LObject.IsNullOrEmpty(value)) { return(null); } else { if (LDateTime.IsDate(value.ToString(), ApplicationConstant.defaultDateTimeFormat)) { return(LDateTime.StringToDate(value.ToString(), ApplicationConstant.defaultDateTimeFormat)); } else { return(null); } } }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { if (LObject.IsNullOrEmpty(value)) { return(null); } else { if (typeof(DateTime).Equals(value.GetType())) { return(LDateTime.DateToString(System.Convert.ToDateTime(value), ApplicationConstant.defaultDateTimeFormat)); } else { return(null); } } }
private void GetValuesOnForm() { lstIdNhom = new List <string>(); machinhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.FirstOrDefault(); maphonggd = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.FirstOrDefault(); madinhdang = lstSourceDinhDang.ElementAt(cmbDinhDang.SelectedIndex).KeywordStrings.FirstOrDefault(); mangonngu = lstSourceNgonNgu.ElementAt(cmbNgonNgu.SelectedIndex).KeywordStrings.FirstOrDefault(); ngaybaocao = Convert.ToDateTime(raddtNgayBaoCao.Value).ToString(ApplicationConstant.defaultDateTimeFormat); idKhuVuc = lstSourceKhuVuc.ElementAt(cmbKhuVuc.SelectedIndex).KeywordStrings[1]; sidCum = lstSourceCum.ElementAt(cmbCum.SelectedIndex).KeywordStrings[1]; if (cmbKyThu.SelectedItem != null) { AutoCompleteEntry auKyThu = (AutoCompleteEntry)cmbKyThu.SelectedItem; if (auKyThu.KeywordStrings != null && auKyThu.KeywordStrings.Length > 0) { sNgayThuTien = LDateTime.StringToDate(auKyThu.KeywordStrings[2], "yyyyMMdd").ToString(ApplicationConstant.defaultDateTimeFormat); } } }
public KHTV_CHUYEN_DIA_BAN() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfMonth(); raddtDenNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetLastDateOfMonth(); cmbChiNhanh.SelectionChanged += new SelectionChangedEventHandler(cmbChiNhanh_SelectionChanged); }
public TDVM_BANG_XAC_NHAN_SO_DU_VAY_VON() { InitializeComponent(); LoadCombobox(); cmbPhongGD.IsEnabled = false; // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtNgayPhatVon.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetLastDateOfMonth(); }
public List <ThamSoBaoCao> GetParameters() { List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>(); try { if (!Validation()) { return(null); } AutoCompleteEntry auChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex); AutoCompleteEntry auBaoCao = listBaoCao.ElementAt(cmbLoaiBieu.SelectedIndex); AutoCompleteEntry auPhongGD = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex); string maDonViBC = ""; if (auChiNhanh.KeywordStrings[0].Equals("%")) { maDonViBC = ClientInformation.MaToChuc; } else { maDonViBC = auChiNhanh.KeywordStrings[0]; } DataTable table = ((DataView)raddgrDuLieuBCao.ItemsSource).Table; listThamSoBaoCao.Add(new ThamSoBaoCao("P_DonViTinh", numDonViTinh.Value.GetValueOrDefault().ToString(), ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri(), new List <string>(), table.DataSet)); listThamSoBaoCao.Add(new ThamSoBaoCao("P_NguoiLap", ClientInformation.HoTen, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri(), new List <string>(), table.DataSet)); listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayDuLieu", LDateTime.DateToString(raddtNgayChotSoLieu.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat), ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri(), new List <string>(), table.DataSet)); listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayInBCao", LDateTime.DateToString(raddtNgayBaoCao.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri(), new List <string>(), table.DataSet)); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaBaoCao", auBaoCao.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", LDateTime.DateToString(raddtNgayChotSoLieu.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", auChiNhanh.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGD", auPhongGD.KeywordStrings[0], ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@DinhKy", "1", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); listThamSoBaoCao.Add(new ThamSoBaoCao("@DonViTinh", numDonViTinh.Value.GetValueOrDefault().ToString(), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri())); return(listThamSoBaoCao); } catch (System.Exception ex) { Mouse.OverrideCursor = Cursors.Arrow; CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } return(listThamSoBaoCao); }
public TDVM_LICH_THU_NO() { InitializeComponent(); KhoiTaoCombobox(); if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtNgayBaoCao.Value = raddtDenNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); cmbChiNhanh.SelectionChanged += new SelectionChangedEventHandler(cmbChiNhanh_SelectionChanged); cmbPhongGD.SelectionChanged += new SelectionChangedEventHandler(cmbPhongGD_SelectionChanged); cmbKhuVuc.DropDownClosed += new EventHandler(cmbKhuVuc_DropDownClosed); }
private void SetFormData() { //Thông tin chung if (drSource["VAI_TRO"].ToString().Equals("NGUOI_THUA_KE")) { chkNguoiThuaKe.IsChecked = true; } else if (drSource["VAI_TRO"].ToString().Equals("NGUOI_DONG_TRACH_NHIEM")) { chkNguoiDongTrachNhiem.IsChecked = true; } txtHoTen.Text = drSource["HO_TEN"].ToString(); if (LDateTime.IsDate(drSource["NGAY_SINH"].ToString(), ApplicationConstant.defaultDateTimeFormat)) { raddtNgaySinh.Value = LDateTime.StringToDate(drSource["NGAY_SINH"].ToString(), ApplicationConstant.defaultDateTimeFormat); } cmbGioiTinh.SelectedIndex = lstSourceGioiTinh.IndexOf(lstSourceGioiTinh.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["GIOI_TINH"]))); cmbDanToc.SelectedIndex = lstSourceDanToc.IndexOf(lstSourceDanToc.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["DAN_TOC"]))); cmbQuanHeVoiThanhVien.SelectedIndex = lstSourceMoiQuanHe.IndexOf(lstSourceMoiQuanHe.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["QH_VOI_TVIEN"]))); cmbTrinhDoHocVan.SelectedIndex = lstSourceTrinhDoHocVan.IndexOf(lstSourceTrinhDoHocVan.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["TDO_HVAN"]))); cmbNgheNghiep.SelectedIndex = lstSourceNgheNghiep.IndexOf(lstSourceNgheNghiep.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["NGHE_NGHIEP"]))); cmbTinhTrangSucKhoe.SelectedIndex = lstSourceSucKhoe.IndexOf(lstSourceSucKhoe.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["SUC_KHOE"]))); txtSoCMND.Text = drSource["SO_CMND"].ToString(); if (LDateTime.IsDate(drSource["NGAY_CAP"].ToString(), ApplicationConstant.defaultDateTimeFormat)) { raddtNgayCap.Value = LDateTime.StringToDate(drSource["NGAY_CAP"].ToString(), ApplicationConstant.defaultDateTimeFormat); } cmbNoiCap.SelectedIndex = lstSourceNoiCap.IndexOf(lstSourceNoiCap.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["NOI_CAP"]))); cmbQuanHeKT.SelectedIndex = lstSourceQuanHeKT.IndexOf(lstSourceQuanHeKT.FirstOrDefault(i => i.KeywordStrings.First().Equals(drSource["QUAN_HE_KT"]))); chkKhongCungHoKhauKH.IsChecked = Convert.ToBoolean(drSource["CUNG_HKHAU_TVIEN"].ToString()); //Người thừa kế không cùng hộ khẩu KH txtSoHoKhau.Text = drSource["SO_HKHAU"].ToString(); txtSoDienThoai.Text = drSource["SDT"].ToString(); txtDiaChi.Text = drSource["DIA_CHI"].ToString(); txtGhiChu.Text = drSource["GHI_CHU"].ToString(); txtHoTenCha.Text = drSource["TEN_BO"].ToString(); txtTenBanDia.Text = drSource["TEN_BAN_DIA"].ToString(); txtEmail.Text = drSource["EMAIL"].ToString(); txtDiaChiNoiCap.Text = drSource["DIA_CHI_NOI_CAP"].ToString(); txtSDT.Text = drSource["SDT"].ToString(); }
public HDVO_BANG_THOP_CPHI_LAI_TGUI_CKH_THEO_PGD() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = LDateTime.GetFirstDateOfMonth(LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd")); raddtDenNgay.Value = LDateTime.GetLastDateOfMonth(LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd")); raddtNgayBaoCao.Value = DateTime.Now; }
private void LoadDuLieu() { try { KeToanProcess process = new KeToanProcess(); string maDonVi = "(''" + cmbDonVi.SelectedItem.Value + "'',"; maDonVi = maDonVi.Substring(0, maDonVi.Length - 1) + ")"; string ngayDL = ""; if (teldtSoDuNgay.Text != "") { ngayDL = LDateTime.DateToString(LDateTime.StringToDate(teldtSoDuNgay.Text, "dd/MM/yyyy"), ApplicationConstant.defaultDateTimeFormat); } string ListMaPloai = ""; foreach (TreeNode item in tvwPhanLoai.CheckedNodes) { ListMaPloai += "''" + item.Value.ToString() + "'',"; } if (ListMaPloai.Length > 0) { ListMaPloai = "(" + ListMaPloai.Substring(0, ListMaPloai.Length - 1) + ")"; } DataTable dtThamSo = null; LDatatable.MakeParameterTable(ref dtThamSo); LDatatable.AddParameter(ref dtThamSo, "@MaDonVi", "STRING", maDonVi); LDatatable.AddParameter(ref dtThamSo, "@MaPhanLoai", "STRING", ListMaPloai); LDatatable.AddParameter(ref dtThamSo, "@MaTK", "STRING", txtMaPhanLoaiTK.Text); LDatatable.AddParameter(ref dtThamSo, "@TenTK", "STRING", ""); LDatatable.AddParameter(ref dtThamSo, "@NgayDL", "STRING", ngayDL); LDatatable.AddParameter(ref dtThamSo, "@SoDuTu", "DECIMAL", "0"); LDatatable.AddParameter(ref dtThamSo, "@SoDuDen", "DECIMAL", "0"); LDatatable.AddParameter(ref dtThamSo, "@TinhChat", "STRING", ""); grdTaiKhoanDS.DataSource = process.getDanhSachTaiKhoanChiTiet(dtThamSo, "DANH_SACH"); grdTaiKhoanDS.DataBind(); } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
private void GetFormData(ref NS_QLY_DU_AN_DTO obj) { try { obj = new NS_QLY_DU_AN_DTO(); obj.ID_DU_AN = Convert.ToInt32(lstSourceDuAn.ElementAt(cmbDuAn.SelectedIndex).KeywordStrings.ElementAt(1)); List <NS_QLY_DU_AN> lst = new List <NS_QLY_DU_AN>(); NS_QLY_DU_AN objQLyDuAn = null; foreach (DataRow dr in dt.Rows) { objQLyDuAn = new NS_QLY_DU_AN(); objQLyDuAn.ID_DU_AN = obj.ID_DU_AN; objQLyDuAn.ID_HO_SO = Convert.ToInt32(dr["ID_HSO"]); objQLyDuAn.ID_CHUC_VU_DU_AN = Convert.ToInt32(dr["CHUC_VU"]); objQLyDuAn.ID_NGUOI_QLY = Convert.ToInt32(dr["NQL"]); if (LDateTime.IsDate(dr["NGAY_THAM_GIA"].ToString(), "dd/MM/yyyy")) { objQLyDuAn.NGAY_THAM_GIA = LDateTime.StringToDate(dr["NGAY_THAM_GIA"].ToString(), "dd/MM/yyyy").ToString("yyyyMMdd"); } objQLyDuAn.TTHAI_BGHI = BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri(); objQLyDuAn.TTHAI_NVU = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri(); objQLyDuAn.MA_DVI_QLY = ClientInformation.MaDonVi; objQLyDuAn.MA_DVI_TAO = ClientInformation.MaDonViGiaoDich; objQLyDuAn.NGAY_NHAP = ClientInformation.NgayLamViecHienTai; objQLyDuAn.NGUOI_NHAP = ClientInformation.TenDangNhap; objQLyDuAn.NGAY_CNHAT = ClientInformation.NgayLamViecHienTai; objQLyDuAn.NGUOI_CNHAT = ClientInformation.TenDangNhap; lst.Add(objQLyDuAn); } obj.LST_QLY_DU_AN = lst.ToArray(); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } }
public GDKT_SO_TH_TAI_KHOAN_DOI_UNG() { InitializeComponent(); LoadCombobox(); GetTaiKhoan(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetFirstDateOfMonth(); raddtDenNgay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat).GetLastDateOfMonth(); cmbChiNhanh.SelectionChanged += cmbChiNhanh_SelectionChanged; cmbPhongGD.SelectionChanged += cmbPhongGD_SelectionChanged; }
public TDVM_DS_KHTV_NHAN_VON_00() { InitializeComponent(); LoadCombobox(); cmbChiNhanh.SelectionChanged += new SelectionChangedEventHandler(cmbChiNhanh_SelectionChanged); cmbPhongGD.SelectionChanged += new SelectionChangedEventHandler(cmbPhongGD_SelectionChanged); cmbCum.SelectionChanged += cmbCum_SelectionChanged; // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtNgayPhatVon.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); }
public GDKT_LUU_CHUYEN_TIEN_TE() { InitializeComponent(); LoadCombobox(); // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } ShowControl(); raddtNgayBaoCao.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); raddtThangChot.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); cmbDinhKy.SelectionChanged += new SelectionChangedEventHandler(cmbDinhKy_SelectionChanged); }
public TDVM_SAO_KE_VON_DAI_HAN() { InitializeComponent(); LoadCombobox(); LoadTreeview(); LoadTreeSanPham(); //LoadCombobox(); ??? // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } raddtTuNgay.Value = raddtNgayChotSoLieu.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); raddtNgayBaoCao.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, ApplicationConstant.defaultDateTimeFormat); }
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); } }