private void BindPoint(int FileID) { try { //btnExport.Enabled = false; PointFiles file = new PointFiles(); LPWeb.Model.PointFiles fileModel = new LPWeb.Model.PointFiles(); fileModel = file.GetModel(iFileID); if (fileModel == null) { return; } txbPointFileName.Text = fileModel.Name; PointFolders folder = new PointFolders(); LPWeb.Model.PointFolders folderModel = new LPWeb.Model.PointFolders(); folderModel = folder.GetModel(fileModel.FolderId); if (folderModel != null && folderModel.Name.Length > 0) { ddlPointFolder.Text = folderModel.Name; } if (txbPointFileName.Text.Length > 0 && ddlPointFolder.Text.Length > 0) { //btnExport.Enabled = true; } } catch { } }
private void BindPoint(int FileID) { try { //btnExport.Enabled = false; PointFiles file = new PointFiles(); LPWeb.Model.PointFiles fileModel = new LPWeb.Model.PointFiles(); fileModel = file.GetModel(iFileID); if (fileModel == null) { return; } txbPointFileName.Text = fileModel.Name; PointFolders folder = new PointFolders(); if (fileModel.FolderId > 0) { LPWeb.Model.PointFolders folderModel = new LPWeb.Model.PointFolders(); folderModel = folder.GetModel(fileModel.FolderId); if (folderModel != null && folderModel.Name.Length > 0) { ListItem item = new ListItem(folderModel.Name, folderModel.FolderId.ToString()); ddlPointFolder.Items.Insert(0, item); } ddlPointFolder.Enabled = false; } else if (ddlPointFolder.Items.Count > 1) { ddlPointFolder.Enabled = true; } if (txbPointFileName.Text.Length > 0 && ddlPointFolder.Text.Length > 0) { if (!txbPointFileName.Text.ToUpper().EndsWith(".PRS") && !txbPointFileName.Text.ToUpper().EndsWith(".BRW")) { //btnExport.Enabled = false; return; } string filename = System.IO.Path.GetFileName(txbPointFileName.Text); if (txbPointFileName.Text.ToUpper().EndsWith(".PRS")) { txbPointFileName.Text = @"\PROSPECT\" + filename; } else { txbPointFileName.Text = @"\BORROWER\" + filename; } ///btnExport.Enabled = true; } } catch (Exception ex) { LPLog.LogMessage(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { #region 校验页面参数 string sReturnUrl = "../Pipeline/ProspectPipelineSummaryLoan.aspx"; string sErrorMsg = "Failed to load this page: missing required query string."; // FileID bool bIsValid = PageCommon.ValidateQueryString(this, "FileID", QueryStringType.ID); if (bIsValid == false) { PageCommon.WriteJsEnd(this, sErrorMsg, "window.parent.location.href='" + sReturnUrl + "'"); } string sFileID = this.Request.QueryString["FileID"]; this.hfFileID.Value = sFileID; try { this.iFileID = Convert.ToInt32(sFileID); } catch { } #endregion #region LoadbaseInfo loanInfo = bllLoans.GetModel(iFileID); if (loanInfo != null) { iBranchId = (loanInfo.BranchID == null) ? 0 : loanInfo.BranchID.Value; } pointFileInfo = bllPointFile.GetModel(iFileID); iPointFolderId = (pointFileInfo == null || pointFileInfo.FolderId <= 0) ? 0 : pointFileInfo.FolderId; if (iPointFolderId > 0) { pointFolderInfo = bllPointFolders.GetModel(pointFileInfo.FolderId); } #endregion if (!IsPostBack) { BindData(); } }
private void BindPage(int fileId, int hisId) { BLL.Loans bllLoans = new BLL.Loans(); Model.Loans modelLoan = new Model.Loans(); BLL.Contacts bllContact = new BLL.Contacts(); BLL.Users bllUser = new BLL.Users(); BLL.PointImportHistory bllPointImportHistory = new PointImportHistory(); BLL.PointFiles bllPointFiles = new PointFiles(); BLL.PointFolders bllPointFolders = new PointFolders(); var dsList = new DataSet(); if (fileId > 0) { dsList = bllPointImportHistory.GetList(string.Format("FileId={0}", fileId)); } else if (hisId > 0) { dsList = bllPointImportHistory.GetList(string.Format("HistoryId={0}", hisId)); } if (dsList == null || dsList.Tables.Count == 0 || dsList.Tables[0].Rows.Count == 0) { PageCommon.AlertMsg(this, "There is no data in database."); return; } fileId = int.Parse(dsList.Tables[0].Rows[0]["FileId"].ToString()); hfdHisId.Value = fileId.ToString(); var modelPointFiles = bllPointFiles.GetModel(fileId); if (modelPointFiles != null) { var modelPointFolder = bllPointFolders.GetModel(modelPointFiles.FolderId); if (modelPointFolder != null) { lblPointFile.Text = modelPointFolder.Name + modelPointFiles.Name; } } lblBorrower.Text = bllContact.GetBorrower(fileId); lblLoanOfficer.Text = bllUser.GetLoanOfficer(fileId); // Start: get icon name by fileId, 2010-11-15 if (string.IsNullOrEmpty(imgSrc)) { string strSeverity = dsList.Tables[0].Rows[0]["Severity"].ToString().ToLower(); switch (strSeverity) { case "error": imgIcon.Src = "../images/loan/AlertError.png"; break; case "warning": imgIcon.Src = "../images/loan/AlertWarning.png"; break; default: imgIcon.Visible = false; break; } } else { imgIcon.Src = "../images/loan/" + imgSrc; } // End: get icon name by fileId, 2010-11-15 DateTime dt = DateTime.MinValue; DateTime.TryParse(dsList.Tables[0].Rows[0]["ImportTime"].ToString(), out dt); if (dt != DateTime.MinValue) { lblTime.Text = dt.ToString("MM/dd/yyyy hh:mm:ss"); } if (!string.IsNullOrEmpty(dsList.Tables[0].Rows[0]["Error"].ToString())) { string s1 = dsList.Tables[0].Rows[0]["Error"].ToString().Trim(); s1 = s1.Replace("<br/> ", "\r\n"); s1 = s1.Replace("<br/> ", "\r\n"); s1 = s1.Replace("<br/>", "\r\n"); tbxErrorMessages.Text = s1; } }