コード例 #1
0
 void GetFormData(BusinessConstant.TrangThaiNghiepVu nghiepvu, BusinessConstant.TrangThaiBanGhi bghi)
 {
     TDVMDUTHU = new TDVM_DU_THU();
     lstDuThu  = (List <DANH_SACH_KHE_UOC_DU_THU>)raddgrDuThuDS.ItemsSource;
     TDVMDUTHU.DSACH_KHE_UOC        = lstDuThu.ToArray();
     TDVMDUTHU.MA_GIAO_DICH         = txtSoGD.Text;
     TDVMDUTHU.ID_GIAO_DICH         = iDGiaoDich;
     TDVMDUTHU.DIEN_GIAI            = txtDienGiai.Text;
     TDVMDUTHU.DU_THU_DEN_NGAY      = LDateTime.DateToString(teldtDuThuDenNgay.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat);
     TDVMDUTHU.LOAI_TIEN            = ClientInformation.MaDongNoiTe;
     TDVMDUTHU.MA_DVI               = ClientInformation.MaDonViGiaoDich;
     TDVMDUTHU.NGAY_GIAO_DICH       = LDateTime.DateToString(teldtNgayGD.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat);
     TDVMDUTHU.TRANG_THAI_BAN_GHI   = bghi.layGiaTri();
     TDVMDUTHU.TRANG_THAI_NGHIEP_VU = nghiepvu.layGiaTri();
     TDVMDUTHU.TY_LE     = (decimal)numTyLe.Value.GetValueOrDefault(100);
     TDVMDUTHU.NGAY_LAP  = ClientInformation.NgayLamViecHienTai;
     TDVMDUTHU.NGUOI_LAP = ClientInformation.TenDangNhap;
     if (iDGiaoDich > 0)
     {
         TDVMDUTHU.NGAY_LAP       = LDateTime.DateToString(teldtNgayNhap.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat);;
         TDVMDUTHU.NGUOI_LAP      = txtNguoiLap.Text;
         TDVMDUTHU.NGAY_CAP_NHAT  = ClientInformation.NgayLamViecHienTai;
         TDVMDUTHU.NGUOI_CAP_NHAT = ClientInformation.TenDangNhap;
     }
 }
コード例 #2
0
        private DM_KHU_VUC GetDataForm(BusinessConstant.TrangThaiNghiepVu nghiepvu, BusinessConstant.TrangThaiSuDung sudung)
        {
            DM_KHU_VUC obj   = new DM_KHU_VUC();
            DataSet    dsDVi = new DanhMucProcess().getDonViTheoMa(lstSourcePGD.ElementAt(cmbDonVi.SelectedIndex).KeywordStrings[0]);

            obj.ID          = idKhuVuc;
            obj.ID_DVI      = Convert.ToInt32(dsDVi.Tables[0].Rows[0]["ID"]);
            obj.MA_DVI      = lstSourcePGD.ElementAt(cmbDonVi.SelectedIndex).KeywordStrings.FirstOrDefault();
            obj.MA_DVI_QLY  = ClientInformation.MaDonVi;
            obj.MA_DVI_TAO  = lstSourcePGD.ElementAt(cmbDonVi.SelectedIndex).KeywordStrings.FirstOrDefault();
            obj.MA_KVUC     = txtMaKhuVuc.Text;
            obj.TEN_KVUC    = txtTenKhuVuc.Text;
            obj.TEN_TAT     = txtTenTat.Text;
            obj.TTHAI_NVU   = nghiepvu.layGiaTri();
            obj.TTHAI_BGHI  = sudung.layGiaTri();
            obj.NGAY_CNHAT  = idKhuVuc > 0 ? ClientInformation.NgayLamViecHienTai : "";
            obj.NGUOI_CNHAT = idKhuVuc > 0 ? ClientInformation.TenDangNhap : "";
            obj.NGAY_NHAP   = idKhuVuc == 0 ? ClientInformation.NgayLamViecHienTai : LDateTime.DateToString(txtNgayLap.Value.GetValueOrDefault(), ApplicationConstant.defaultDateTimeFormat);
            obj.NGUOI_NHAP  = idKhuVuc == 0 ? ClientInformation.TenDangNhap : txtNguoiLap.Text;
            return(obj);
        }
コード例 #3
0
        private void GetFormData(ref TDTD_HOP_DONG_TCHAP obj, BusinessConstant.TrangThaiNghiepVu tthaiNVu)
        {
            try
            {
                obj            = new TDTD_HOP_DONG_TCHAP();
                obj.ID         = idHDTC;
                obj.MA_HDTC    = txtSoHopDong.Text;
                obj.MA_KHANG   = txtMaKH.Text;
                obj.NGAY_HDTC  = teldtNgayHopDong.Value.Value.ToString("yyyyMMdd");
                lstTSDB        = raddgrDSachTSDB.ItemsSource as List <DataRow>;
                obj.SO_PLUC_HD = soPhuLucTC;
                if (idHDTC == 0)
                {
                    obj.MA_DVI_QLY = ClientInformation.MaDonVi;
                    obj.MA_DVI_TAO = ClientInformation.MaDonViGiaoDich;
                    obj.NGAY_NHAP  = ClientInformation.NgayLamViecHienTai;
                    obj.NGUOI_NHAP = ClientInformation.TenDangNhap;
                    obj.TTHAI_BGHI = BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri();
                }
                else
                {
                    obj.MA_DVI_QLY  = maDviQLy;
                    obj.MA_DVI_TAO  = maDViTao;
                    obj.NGAY_NHAP   = teldtNgayNhap.Value.GetValueOrDefault().ToString(ApplicationConstant.defaultDateTimeFormat);
                    obj.NGUOI_NHAP  = txtNguoiLap.Text;
                    obj.NGAY_CNHAT  = ClientInformation.NgayLamViecHienTai;
                    obj.NGUOI_CNHAT = ClientInformation.TenDangNhap;
                    obj.TTHAI_BGHI  = BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri();
                }
                obj.TTHAI_NVU = tthaiNVu.layGiaTri();
                obj.DIEN_GIAI = txtDienGiai.Text;

                List <TDTD_TAI_SAN_DAM_BAO> lstTaiSan = new List <TDTD_TAI_SAN_DAM_BAO>();
                foreach (DataRow dr in lstTSDB)
                {
                    TDTD_TAI_SAN_DAM_BAO objTS = new TDTD_TAI_SAN_DAM_BAO();
                    objTS.ID              = LNumber.StringToInt32(dr["ID"].ToString());
                    objTS.MA_TSDB         = dr["MA_TSDB"].ToString();
                    objTS.TEN_TSDB        = dr["TEN_TSDB"].ToString();
                    objTS.MA_LOAI_TSDB    = dr["MA_LOAI_TSDB"].ToString();
                    objTS.SO_SO_TK        = dr["SO_SO_TK"].ToString();
                    objTS.MO_TAI_LMF      = dr["MO_TAI_LMF"].ToString();
                    objTS.GIA_TRI_TAI_SAN = LNumber.ToDecimal(dr["GTRI_TAI_SAN"].ToString());
                    objTS.TI_LE_DAM_BAO   = LNumber.ToDecimal(dr["TI_LE_DAM_BAO"].ToString());
                    objTS.GIA_TRI_DAM_BAO = LNumber.ToDecimal(dr["GTRI_DAM_BAO"].ToString());
                    objTS.DIEN_GIAI       = dr["DIEN_GIAI"].ToString();
                    objTS.TTHAI_BGHI      = dr["TTHAI_BGHI"].ToString();
                    objTS.TTHAI_NVU       = dr["TTHAI_NVU"].ToString();
                    objTS.MA_DVI_QLY      = dr["MA_DVI_QLY"].ToString();
                    objTS.MA_DVI_TAO      = dr["MA_DVI_TAO"].ToString();
                    objTS.NGAY_NHAP       = dr["NGAY_NHAP"].ToString();
                    objTS.NGUOI_NHAP      = dr["NGUOI_NHAP"].ToString();
                    objTS.NGAY_CNHAT      = dr["NGAY_CNHAT"].ToString();
                    objTS.NGUOI_CNHAT     = dr["NGUOI_CNHAT"].ToString();

                    lstTaiSan.Add(objTS);
                }
                obj.DSACH_TAI_SAN_DBAO = lstTaiSan.ToArray();
                obj.TONG_GIA_TRI       = lstTaiSan.Sum(f => f.GIA_TRI_DAM_BAO);
                if (lstIDXoa.IsNullOrEmpty())
                {
                    lstIDXoa = new List <int>();
                }
                obj.DSACH_ID_XOA = lstIDXoa.ToArray();
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
        }