Exemple #1
0
 protected void txtInstalment5_TextChanged(object sender, EventArgs e)
 {
     AdminEditPopup.Show();
     if (Int32.TryParse(txtInstalment5.Text.Trim(), out int result))
         if (!CheckLoanAmount(result))
         {
             lblInstalmentError5.Text = "Amount must be less than 100000";
             AdminEditPopup.Show();
         }
 }
Exemple #2
0
        protected void btnAdminEditLoan_Click(object sender, EventArgs e)
        {
            lblInstalmentError1.Text = "";
            lblInstalmentError2.Text = "";
            lblInstalmentError3.Text = "";
            lblInstalmentError4.Text = "";
            lblInstalmentError5.Text = "";

            Button btnZM = (Button)sender;
            GridViewRow gvr = (GridViewRow)btnZM.NamingContainer;
            int rowindex = gvr.RowIndex;
            lblAdminEditApplicationNumber.Text = ArivugvZMApprove.DataKeys[rowindex].Values["ApplicationNumber"].ToString();
            lblAdminEditApplicantName.Text = ArivugvZMApprove.DataKeys[rowindex].Values["ApplicantName"].ToString();
            txtInstalment1.Text = ArivugvZMApprove.DataKeys[rowindex].Values["Year1Loan"].ToString();
            txtInstalment2.Text = ArivugvZMApprove.DataKeys[rowindex].Values["Year2Loan"].ToString();
            txtInstalment3.Text = ArivugvZMApprove.DataKeys[rowindex].Values["Year3Loan"].ToString();
            txtInstalment4.Text = ArivugvZMApprove.DataKeys[rowindex].Values["Year4Loan"].ToString();
            txtInstalment5.Text = ArivugvZMApprove.DataKeys[rowindex].Values["Year5Loan"].ToString();
            AdminEditPopup.Show();
        }
Exemple #3
0
        protected void btnUpdateLoanAmount_Click(object sender, EventArgs e)
        {
            lblInstalmentError1.Text = "";
            string loan1="0", loan2 = "0", loan3 = "0", loan4 = "0", loan5 = "0";
            if (txtInstalment1.Text.Trim() != null && txtInstalment1.Text.Trim() != "")
            {
                if (Int32.TryParse(txtInstalment1.Text.Trim(), out int num1) && txtInstalment1.Text.Trim() != null || txtInstalment1.Text.Trim() != "") { loan1 = txtInstalment1.Text.Trim(); }
                if (Int32.TryParse(txtInstalment2.Text.Trim(), out int num2) && txtInstalment2.Text.Trim() != null || txtInstalment2.Text.Trim() != "") { loan2 = txtInstalment2.Text.Trim(); }
                if (Int32.TryParse(txtInstalment3.Text.Trim(), out int num3) && txtInstalment3.Text.Trim() != null || txtInstalment3.Text.Trim() != "") { loan3 = txtInstalment3.Text.Trim(); }
                if (Int32.TryParse(txtInstalment4.Text.Trim(), out int num4) && txtInstalment4.Text.Trim() != null || txtInstalment4.Text.Trim() != "") { loan4 = txtInstalment4.Text.Trim(); }
                if (Int32.TryParse(txtInstalment5.Text.Trim(), out int num5) && txtInstalment5.Text.Trim() != null || txtInstalment5.Text.Trim() != "") { loan5 = txtInstalment5.Text.Trim(); }

                UpdateLoanAmount(lblAdminEditApplicationNumber.Text, loan1, loan2, loan3, loan4, loan5);
                this.FillAdminApproveGrid();
            }
            else
            {
                lblInstalmentError1.Text = "1st Instalment is Compulsory";
                AdminEditPopup.Show();
            }
            
        }