private void LayThongTinKheUoc(int idKheUoc, string sMaKheUoc, string sLoai) { TinDungProcess tdProcess = new TinDungProcess(); TDVM_KHE_UOC objKuoc = new TDVM_KHE_UOC(); objKuoc.KUOC_VM = new TD_KUOCVM(); objKuoc.KUOC_VM.ID = idKheUoc; objKuoc.KUOC_VM.MA_KUOCVM = sMaKheUoc; int iRet = 0; if (sLoai.Equals("GetByID")) { iRet = tdProcess.GetKUocById(ref objKuoc); } else { iRet = tdProcess.GetKUocByMaKuoc(ref objKuoc); } decimal decDuNoLai = 0; _objKHang = new KH_KHANG_HSO(); if (iRet != 0) { if (objKuoc.KUOC_VM != null) { decDuNoLai = objKuoc.KUOC_VM.LAI_PHAI_THU - objKuoc.KUOC_VM.LAI_DA_THU; _objKuoc = objKuoc.KUOC_VM; if (_objKuoc.MA_DVI_TAO != ClientInformation.MaDonViGiaoDich) { _objKuoc = null; XoaDuLieu(); return; } HienThiDSTaiSan(_objKuoc.ID.ToString()); _decDuPhongCuThe = objKuoc.KUOC_VM.SO_TIEN_TLDP; txtSoKheUoc.Text = objKuoc.KUOC_VM.MA_KUOCVM; teldtNgayVay.Value = LDateTime.StringToDate(objKuoc.KUOC_VM.NGAY_GIAI_NGAN, "yyyyMMdd"); txtThoiHanVay.Text = objKuoc.KUOC_VM.TGIAN_VAY.ToString(); cmbThoiHanVay.SelectedIndex = lstThoiHanVay.IndexOf(lstThoiHanVay.FirstOrDefault(e => e.KeywordStrings[0].Equals(objKuoc.KUOC_VM.TGIAN_VAY_DVI_TINH))); txtLaiSuat.Value = Convert.ToDouble(objKuoc.KUOC_VM.LAI_SUAT); teldtNgayDaoHan.Value = LDateTime.StringToDate(objKuoc.KUOC_VM.NGAY_DAO_HAN, "yyyyMMdd"); txtSoTienVay.Value = Convert.ToDouble(objKuoc.KUOC_VM.SO_TIEN_GIAI_NGAN); cmbNhomNo.SelectedIndex = lstNhomNo.IndexOf(lstNhomNo.FirstOrDefault(e => e.KeywordStrings[0].Equals(objKuoc.KUOC_VM.NHOM_NO_HIEN_TAI))); txtDuNoGoc.Value = Convert.ToDouble(objKuoc.KUOC_VM.SO_DU); txtDuNoLai.Value = Convert.ToDouble(decDuNoLai); txtXuKyDuNoGoc.Value = Convert.ToDouble(objKuoc.KUOC_VM.SO_DU); txtXuKyDuNoLai.Value = Convert.ToDouble(decDuNoLai); iRet = tdProcess.GetKHangByKuoc(ref _objKHang, objKuoc); } else { txtSoKheUoc.Text = ""; teldtNgayVay.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); txtThoiHanVay.Text = "0"; cmbThoiHanVay.SelectedIndex = lstThoiHanVay.IndexOf(lstThoiHanVay.FirstOrDefault(e => e.KeywordStrings[0].Equals(BusinessConstant.KY_HAN_DVI_TINH.THANG.layGiaTri()))); txtLaiSuat.Value = 0; teldtNgayDaoHan.Value = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd"); txtSoTienVay.Value = 0; cmbNhomNo.SelectedIndex = lstNhomNo.IndexOf(lstNhomNo.FirstOrDefault(e => e.KeywordStrings[0].Equals(BusinessConstant.NHOM_NO.NHOM1.layGiaTri()))); txtDuNoGoc.Value = 0; txtDuNoLai.Value = 0; txtXuKyDuNoGoc.Value = 0; txtXuKyDuNoLai.Value = 0; } } TToanTrichLapDuPhongChiPhi(); }