Exemple #1
0
    /// <summary>
    /// Bind Grid
    /// </summary>
    private void BindGrid()
    {
        int pageIndex = 1;
        int pageSize  = AspNetPager1.PageSize;

        if (AspNetPager1.CurrentPageIndex > 0)
        {
            pageIndex = AspNetPager1.CurrentPageIndex;
        }

        string queryCondition = GenOrgQueryCondition();

        int recordCount = 0;

        DataSet ds = null;

        try
        {
            ProspectEmployment bll = new ProspectEmployment();

            ds = bll.GetProspectEmployment(pageSize, pageIndex, queryCondition, out recordCount, OrderName, OrderType);
        }
        catch (Exception exception)
        {
            LPLog.LogMessage(exception.Message);
        }

        AspNetPager1.PageSize    = pageSize;
        AspNetPager1.RecordCount = recordCount;

        gridList.DataSource = ds;
        gridList.DataBind();
    }
Exemple #2
0
    public void Get(int iBorrowerID)
    {
        #region 得到页面数据
        //int? iBorrowerID = 2;

        DataTable dtProspectEmployment = pe.GetProspectEmployment((int)iBorrowerID);

        if (dtProspectEmployment.Rows.Count > 0)
        {
            txtEmployer.Text            = dtProspectEmployment.Rows[0]["CompanyName"].ToString();
            ddlStartMonth.SelectedValue = dtProspectEmployment.Rows[0]["StartMonth"].ToString();
            string sSelfEmployed = dtProspectEmployment.Rows[0]["SelfEmployed"].ToString();
            if (sSelfEmployed == "True")
            {
                this.ddlDependants.SelectedValue = "Yes";
            }
            else if (sSelfEmployed == "False")
            {
                this.ddlDependants.SelectedValue = "No";
            }

            ddlStartYear.SelectedValue = dtProspectEmployment.Rows[0]["StartYear"].ToString();
            txtTP.Text = dtProspectEmployment.Rows[0]["Position"].ToString();
            ddlEndDate.SelectedValue = dtProspectEmployment.Rows[0]["EndMonth"].ToString();
            ddlEndYear.SelectedValue = dtProspectEmployment.Rows[0]["EndYear"].ToString();
            txtProfession.Text       = dtProspectEmployment.Rows[0]["BusinessType"].ToString();
            txtYearsInField.Text     = dtProspectEmployment.Rows[0]["YearsOnWork"].ToString();
        }

        DataTable dtProspectIncome = pi.GetProspectIncome((int)iBorrowerID);

        if (dtProspectEmployment.Rows.Count > 0)
        {
            txtMonthlySalary.Text = dtProspectEmployment.Rows[0]["Salary"].ToString();
        }
        #endregion
    }