private void UpdateTheRateExtendLock(int extendDays) { BLL.Company_Alerts bllComAlert = new Company_Alerts(); BLL.LoanAlerts bllAlert = new LoanAlerts(); BLL.Loans bllLoans = new BLL.Loans(); Model.Loans modelLoan = new Model.Loans(); modelLoan = bllLoans.GetModel(FileId); modelLoan.RateLockExpiration = OrgDate.AddDays(extendDays); bllLoans.Update(modelLoan); var comModel = bllComAlert.GetModel(); //todo:确认此处是否这样查询LoanAlerts表中对应当前Loan的记录 //此处应该只能查处一条数据 var alertModelList = bllAlert.GetModelList(string.Format("FileId={0} AND AlertType={1}", FileId, "'Rate Lock'")); if (alertModelList.Count == 0) { return; } //if (extendDays < comModel.RateLockYellowDays || extendDays < comModel.RateLockRedDays) //{ // alertModelList[0].DueDate = OrgDate.AddDays(extendDays); // bllAlert.Update(alertModelList[0]); //} //else if (extendDays > comModel.RateLockYellowDays || extendDays > comModel.RateLockRedDays) //{ // alertModelList[0].DueDate = OrgDate.AddDays(extendDays); // bllAlert.Delete(alertModelList[0].LoanAlertId); //} PageCommon.WriteJs(this, "Update succeeded!", "window.parent.parent.location.href=window.parent.parent.location.href;parent.CloseCurrentWindowHandller();"); }
private void BindPage(int fileId) { BLL.Loans bllLoans = new BLL.Loans(); Model.Loans modelLoan = new Model.Loans(); BLL.Contacts bllContact = new BLL.Contacts(); BLL.Users bllUser = new BLL.Users(); modelLoan = bllLoans.GetModel(fileId); if (modelLoan != null && modelLoan.RateLockExpiration != null) { lblRateLockExp.Text = modelLoan.RateLockExpiration.Value.ToShortDateString(); hfdExpDate.Value = modelLoan.RateLockExpiration.Value.ToOADate().ToString(); } lblCurrentState.Text = bllLoans.GetLoanStage(fileId); lblBorrower.Text = bllContact.GetBorrower(fileId); if (modelLoan != null) { lblEstCloseDate.Text = modelLoan.EstCloseDate != null?modelLoan.EstCloseDate.Value.ToShortDateString() : string.Empty; } lblCoborrower.Text = bllContact.GetCoBorrower(fileId); lblLoanOfficer.Text = bllUser.GetLoanOfficer(fileId); if (modelLoan != null) { lblPropertyAddress.Text = modelLoan.PropertyAddr + " " + modelLoan.PropertyCity + " " + modelLoan.PropertyState + " " + modelLoan.PropertyZip; } if (modelLoan != null && modelLoan.LoanAmount.HasValue) { lblLoanAmount.Text = "$" + string.Format("{0:N0}", modelLoan.LoanAmount.Value); } if (modelLoan != null && modelLoan.Rate.HasValue) { lblInterestRate.Text = modelLoan.Rate.Value.ToString("#.####") + "%"; } lblLender.Text = bllLoans.GetLender(fileId); hfdFileId.Value = fileId.ToString(); }