protected void Page_Load(object sender, EventArgs e)
    {
        ListItem LItem = new ListItem("--Select--", "0");
        ddlFee.Items.Insert(0, LItem);
        ddlPaymentMode.Items.Insert(0, LItem);

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        LoanDS.LoanApplicationsDataTable tblLoanApp = loanApp.GetLoanApplication(MySessionManager.AppID.ToString());
        if (tblLoanApp.Rows.Count > 0)
        {
            txtUpdatedLoanAmt.Text = tblLoanApp[0].datLoanAmount.ToString("c").Replace("$", "");
            txtUpddateDisburseAmt.Text = tblLoanApp[0].datDisburseAmount.ToString("c").Replace("$", "");
        
        }
        txtLoanAmt.Value = Convert.ToString(loanApp.GetLoanAmount(MySessionManager.AppID, MySessionManager.ClientID)).ToString();

        if (!(Request.QueryString["fedit"] == null))
        {
            type = "update";
            id = Convert.ToInt32(Request.QueryString["fedit"]);
            if (!(this.editskip.Value == "2"))
            {
                loadfee(id);
            }
        }
        else if (!(Request.QueryString["fdelete"] == null))
        {
            try
            {
                string id = Request.QueryString["fdelete"];
               updateLoanAmount("delete", 0, 0, Convert.ToInt32(id));
                util.deleteItem("tbl_fees", id);
               
                Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "fdelete"));
            }
            catch
            { }
        }
    }
Exemple #2
0
    public void setApprovalLimit(int level)
    {
        double values  = 0.0;
        double loanAmt = 0.0;

        mainDSTableAdapters.GetApprovalLevelTableAdapter dslevel = new mainDSTableAdapters.GetApprovalLevelTableAdapter();
        values = Convert.ToDouble(dslevel.GetApprovalLimit(level));


        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        loanAmt = Convert.ToDouble(loanApp.GetLoanAmount(MySessionManager.AppID, MySessionManager.ClientID));


        if (values < loanAmt)
        {
            cmbAction.Items[1].Enabled = false;
        }
        else
        {
            cmbAction.Items[1].Enabled = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ListItem LItem = new ListItem("--Select--", "0");

        ddlFee.Items.Insert(0, LItem);
        ddlPaymentMode.Items.Insert(0, LItem);

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        LoanDS.LoanApplicationsDataTable tblLoanApp = loanApp.GetLoanApplication(MySessionManager.AppID.ToString());
        if (tblLoanApp.Rows.Count > 0)
        {
            txtUpdatedLoanAmt.Text     = tblLoanApp[0].datLoanAmount.ToString("c").Replace("$", "");
            txtUpddateDisburseAmt.Text = tblLoanApp[0].datDisburseAmount.ToString("c").Replace("$", "");
        }
        txtLoanAmt.Value = Convert.ToString(loanApp.GetLoanAmount(MySessionManager.AppID, MySessionManager.ClientID)).ToString();

        if (!(Request.QueryString["fedit"] == null))
        {
            type = "update";
            id   = Convert.ToInt32(Request.QueryString["fedit"]);
            if (!(this.editskip.Value == "2"))
            {
                loadfee(id);
            }
        }
        else if (!(Request.QueryString["fdelete"] == null))
        {
            try
            {
                string id = Request.QueryString["fdelete"];
                updateLoanAmount("delete", 0, 0, Convert.ToInt32(id));
                util.deleteItem("tbl_fees", id);

                Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "fdelete"));
            }
            catch
            { }
        }
    }
    public void setApprovalLimit(int level)
    {
        double values=0.0;
        double loanAmt = 0.0;
      
        mainDSTableAdapters.GetApprovalLevelTableAdapter dslevel = new mainDSTableAdapters.GetApprovalLevelTableAdapter();
        values  = Convert.ToDouble(dslevel.GetApprovalLimit(level));

       
        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        loanAmt  = Convert.ToDouble(loanApp.GetLoanAmount(MySessionManager.AppID, MySessionManager.ClientID));


        if (values < loanAmt)
        {
            cmbAction.Items[1].Enabled = false;  
        }
        else
        {
            cmbAction.Items[1].Enabled = true;
        }
    
    }