Exemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="iContactId"></param>
    /// <param name="sMonthlySalar"></param>
    /// <param name="sOtherMonthlyIncome"></param>
    private void CreateProspectIncome(int iContactId, string sMonthlySalar, string sOtherMonthlyIncome)
    {
        #region create ProspectIncome

        LPWeb.Model.ProspectIncome ProspectIncomeModel = new LPWeb.Model.ProspectIncome();

        ProspectIncomeModel.ContactId = iContactId;
        if (sMonthlySalar == string.Empty)
        {
            ProspectIncomeModel.Salary = null;
        }
        else
        {
            ProspectIncomeModel.Salary = Convert.ToDecimal(sMonthlySalar);
        }

        if (sOtherMonthlyIncome == string.Empty)
        {
            ProspectIncomeModel.Other = null;
        }
        else
        {
            ProspectIncomeModel.Other = Convert.ToDecimal(sOtherMonthlyIncome);
        }

        ProspectIncome ProspectIncomeMgr = new ProspectIncome();
        ProspectIncomeMgr.Add(ProspectIncomeModel);


        #endregion
    }
Exemplo n.º 2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="iContactId"></param>
    /// <param name="sMonthlySalar"></param>
    /// <param name="sOtherMonthlyIncome"></param>
    private void UpdateProspectIncome(int iProspectIncomeID, string sMonthlySalar, string sOtherMonthlyIncome)
    {
        #region update ProspectIncome

        ProspectIncome             ProspectIncomeMgr   = new ProspectIncome();
        LPWeb.Model.ProspectIncome ProspectIncomeModel = ProspectIncomeMgr.GetModel(iProspectIncomeID);

        if (sMonthlySalar == string.Empty)
        {
            ProspectIncomeModel.Salary = null;
        }
        else
        {
            ProspectIncomeModel.Salary = Convert.ToDecimal(sMonthlySalar);
        }

        if (sOtherMonthlyIncome == string.Empty)
        {
            ProspectIncomeModel.Other = null;
        }
        else
        {
            ProspectIncomeModel.Other = Convert.ToDecimal(sOtherMonthlyIncome);
        }


        ProspectIncomeMgr.Update(ProspectIncomeModel);


        #endregion
    }
Exemplo n.º 3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        LPModel.ProspectEmployment model = CreateModelFromPage();
        if (hfdEmploymentId.Value == "-1")
        {
            new ProspectEmployment().Add(model);
        }
        else
        {
            new ProspectEmployment().Update(model);
            LPWeb.BLL.ProspectIncome bll = new ProspectIncome();
            bll.UpdateIncome(model.EmplId, string.IsNullOrEmpty(txtSalary.Text) ? "NULL" : txtSalary.Text);
        }

        StringBuilder sbJavaScript = new StringBuilder();

        sbJavaScript.AppendLine("$('#divContainer').hide();");
        sbJavaScript.AppendLine("alert('The Point file(s) has been updated successfully.'); CancelOnClick();");
        // success
        this.ClientScript.RegisterClientScriptBlock(this.GetType(), "_Success", sbJavaScript.ToString(), true);
    }
Exemplo n.º 4
0
    private void InitIncomeAndEmploymentInfo(int iBorrowerID)
    {
        #region 加载 Income and Employment

        #region 加载Employment信息

        ProspectEmployment ProspectEmploymentMgr = new ProspectEmployment();
        DataTable          EmploymentInfo        = ProspectEmploymentMgr.GetList("1=1 and ContactId=" + iBorrowerID + " order by EmplId desc").Tables[0];
        if (EmploymentInfo.Rows.Count > 0)
        {
            this.BorrowerInfo_Employment = EmploymentInfo.Copy();
        }

        #endregion

        #region 加载Income信息

        ProspectIncome ProspectIncomeMgr = new ProspectIncome();
        DataTable      IncomeInfo        = ProspectIncomeMgr.GetList("1=1 and ContactId=" + iBorrowerID + " order by ProspectIncomeId desc").Tables[0];
        if (IncomeInfo.Rows.Count > 0)
        {
            this.BorrowerInfo_Income = IncomeInfo.Copy();
        }

        #endregion

        #region 加载Assets信息

        ProspectAssets ProspectAssetsMgr = new ProspectAssets();
        DataTable      AssetsInfo        = ProspectAssetsMgr.GetList("1=1 and ContactId=" + iBorrowerID + " order by ProspectAssetId desc").Tables[0];
        if (AssetsInfo.Rows.Count > 0)
        {
            this.BorrowerInfo_Assets = AssetsInfo.Copy();
        }

        #endregion

        #endregion
    }