コード例 #1
0
    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
        { }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
ファイル: PointFolders.cs プロジェクト: PulseCRM/Pulse
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <LPWeb.Model.PointFolders> DataTableToList(DataTable dt)
        {
            List <LPWeb.Model.PointFolders> modelList = new List <LPWeb.Model.PointFolders>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                LPWeb.Model.PointFolders model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new LPWeb.Model.PointFolders();
                    if (dt.Rows[n]["FolderId"].ToString() != "")
                    {
                        model.FolderId = int.Parse(dt.Rows[n]["FolderId"].ToString());
                    }
                    model.Name = dt.Rows[n]["Name"].ToString();
                    if (dt.Rows[n]["BranchId"].ToString() != "")
                    {
                        model.BranchId = int.Parse(dt.Rows[n]["BranchId"].ToString());
                    }
                    model.BranchName = dt.Rows[n]["BranchName"].ToString();
                    model.Path       = dt.Rows[n]["Path"].ToString();
                    if (dt.Rows[n]["Enabled"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Enabled"].ToString() == "1") || (dt.Rows[n]["Enabled"].ToString().ToLower() == "true"))
                        {
                            model.Enabled = true;
                        }
                        else
                        {
                            model.Enabled = false;
                        }
                    }
                    if (dt.Rows[n]["ImportCount"].ToString() != "")
                    {
                        model.ImportCount = int.Parse(dt.Rows[n]["ImportCount"].ToString());
                    }
                    if (dt.Rows[n]["LastImport"].ToString() != "")
                    {
                        model.LastImport = DateTime.Parse(dt.Rows[n]["LastImport"].ToString());
                    }
                    if (dt.Rows[n]["LoanStatus"].ToString() != "")
                    {
                        model.LoanStatus = int.Parse(dt.Rows[n]["LoanStatus"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
コード例 #4
0
ファイル: PointInfoTab.aspx.cs プロジェクト: PulseCRM/Pulse
    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();
        }
    }
コード例 #5
0
ファイル: PointFolders.cs プロジェクト: PulseCRM/Pulse
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(LPWeb.Model.PointFolders model)
 {
     dal.Update(model);
 }
コード例 #6
0
ファイル: PointFolders.cs プロジェクト: PulseCRM/Pulse
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(LPWeb.Model.PointFolders model)
 {
     return(dal.Add(model));
 }