Esempio n. 1
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtReceiptNo.Text))
            {
                MainErrorProvider.SetError(txtReceiptNo, "Input Voucher number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtReceiptNo, null);
            }

            if (string.IsNullOrEmpty(txtPaidTo.Text))
            {
                MainErrorProvider.SetError(txtPaidTo, "Input Paid to Information");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtPaidTo, null);
            }
            if (double.Parse(txtAmount.Text) == 0)
            {
                MainErrorProvider.SetError(txtAmount, "Input valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAmount, null);
            }

            return(false);
        }
Esempio n. 2
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtReceiptNo.Text))
            {
                MainErrorProvider.SetError(txtReceiptNo, "Input Voucher Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtReceiptNo, null);
            }

            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select policy number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }
            if (string.IsNullOrEmpty(txtAmount.Text))
            {
                MainErrorProvider.SetError(txtAmount, "Input Valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAmount, null);
            }

            return(false);
        }
Esempio n. 3
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtUserID.Text))
            {
                MainErrorProvider.SetError(txtUserID, "Input Login ID");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtUserID, null);
            }

            if (txtpassword.Text != txtCPassword.Text)
            {
                MainErrorProvider.SetError(txtCPassword, "Password Mismatch");
                MainErrorProvider.SetError(txtpassword, "Password Mismatch");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtCPassword, null);
                MainErrorProvider.SetError(txtpassword, null);
            }
            return(false);
        }
Esempio n. 4
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtUserID.Text))
            {
                MainErrorProvider.SetError(txtUserID, "Input Login ID");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtUserID, null);
            }


            if (txtpassword.Text != txtCPassword.Text)
            {
                MainErrorProvider.SetError(txtCPassword, "Password mismatch");
                MainErrorProvider.SetError(txtpassword, "Password mismatch");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtCPassword, null);
                MainErrorProvider.SetError(txtpassword, null);
            }
            if (cmbUserType.SelectedIndex == -1)
            {
                MainErrorProvider.SetError(cmbUserType, "Select User Type");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbUserType, null);
            }
            return(false);
        }
Esempio n. 5
0
 private void txtLoan_Validated(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(((DevExpress.XtraEditors.TextEdit)sender).Text))
     {
         MainErrorProvider.SetError(((DevExpress.XtraEditors.TextEdit)sender), null);
     }
 }
Esempio n. 6
0
        private bool ErrorFound()
        {
            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select policy Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }

            if (string.IsNullOrEmpty(txtVoucher.Text))
            {
                MainErrorProvider.SetError(txtVoucher, "Enter Voucher#");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtVoucher, null);
            }
            if (dtpClosingDate.DateTime.Year == 1 || dtpClosingDate.DateTime.Year == 9999)
            {
                MainErrorProvider.SetError(dtpClosingDate, "Select Closing Date");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(dtpClosingDate, null);
            }
            return(false);
        }
Esempio n. 7
0
        private bool ErrorFound()
        {
            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select Policy Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }

            if (string.IsNullOrEmpty(txtSavingRatio.Text))
            {
                MainErrorProvider.SetError(txtSavingRatio, "Input Valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtSavingRatio, null);
            }

            if (dtpEnlistedDate.DateTime.Year == 9999 || dtpEnlistedDate.DateTime.Year == 1)
            {
                MainErrorProvider.SetError(dtpEnlistedDate, "Select Date");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(dtpEnlistedDate, null);
            }
            return(false);
        }
Esempio n. 8
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     LockAllText(true);
     MainErrorProvider.SetError(txtName, null);
     MainErrorProvider.SetError(txtAddress, null);
     gridView1.Focus();
 }
Esempio n. 9
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     LockAllText(true);
     MainErrorProvider.SetError(txtCPassword, null);
     MainErrorProvider.SetError(txtpassword, null);
     MainErrorProvider.SetError(txtUserName, null);
     MainErrorProvider.SetError(txtUserID, null);
     MainErrorProvider.SetError(cmbUserType, null);
     gridView1.Focus();
 }
Esempio n. 10
0
 private void txtCapitalperInstallment_Leave(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(txtCapitalperInstallment.Text);
         MainErrorProvider.SetError(txtCapitalperInstallment, null);
     }
     catch (Exception ex)
     {
         MainErrorProvider.SetError(txtCapitalperInstallment, "Input Valid percentage");
     }
 }
Esempio n. 11
0
 private void txtLoanAmount_Leave(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(((DevExpress.XtraEditors.TextEdit)(sender)).Text);
         MainErrorProvider.SetError(((DevExpress.XtraEditors.TextEdit)(sender)), null);
     }
     catch (Exception ex)
     {
         MainErrorProvider.SetError(((DevExpress.XtraEditors.TextEdit)(sender)), "Input Valid amount");
     }
 }
Esempio n. 12
0
 private void txtServiceCharge_Validated(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(((TextEdit)sender).Text);
         MainErrorProvider.SetError((TextEdit)sender, null);
     }
     catch (Exception ex)
     {
         MainErrorProvider.SetError((TextEdit)sender, "Input Valid Amount");
         ((TextEdit)sender).Focus();
     }
 }
Esempio n. 13
0
 private void txtAmount_Validated(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(txtAmount.Text);
         MainErrorProvider.SetError(txtAmount, null);
     }
     catch (Exception cx)
     {
         MainErrorProvider.SetError(txtAmount, "Input Valid Amount");
         txtAmount.Focus();
     }
 }
Esempio n. 14
0
 private bool ErrorFound()
 {
     if (string.IsNullOrEmpty(txtName.Text))
     {
         MainErrorProvider.SetError(txtName, "Insert Employee Name");
         return(true);
     }
     if (string.IsNullOrEmpty(txtAddress.Text))
     {
         MainErrorProvider.SetError(txtAddress, "Insert Employee Address");
         return(true);
     }
     return(false);
 }
Esempio n. 15
0
 private void txtLoan_Leave(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(txtLoan.Text);
         MainErrorProvider.SetError(txtLoan, null);
         txtCapital.Text  = (_capitalPercent * d / 100).ToString();
         txtInterest.Text = (_interestPercent * d / 100).ToString();
     }
     catch (Exception ex)
     {
         MainErrorProvider.SetError(txtLoan, "Input valid Amount");
         txtLoan.Focus();
     }
 }
Esempio n. 16
0
 private void txtLoanDurationApproved_Leave(object sender, EventArgs e)
 {
     try
     {
         double d = double.Parse(txtLoanDurationApproved.Text);
         MainErrorProvider.SetError(txtLoanDurationApproved, null);
         if (!string.IsNullOrEmpty(txtAmountperInstallment.Text))
         {
             txtTotalAmountPayable.Text = (d * double.Parse(txtAmountperInstallment.Text)).ToString();
         }
     }
     catch (Exception ex)
     {
         MainErrorProvider.SetError(txtLoanDurationApproved, "Input Valid Duration");
     }
 }
Esempio n. 17
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            if (ErrorFound())
            {
                return;
            }
            if (_isUpdate)
            {
                if (MessageBox.Show("Do you want to update user information", "User Info", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                {
                    return;
                }
                DataRow dr = dsUser.LoginUser.Rows.Find(_EditID);
                dr["UserName"] = txtUserID.Text.ToLower();
                dr["FullName"] = txtUserName.Text;
                dr["Password"] = txtpassword.Text;
                dr["Type"]     = cmbUserType.SelectedIndex + 1;
                DataHelper.UpdateData(dsUser.LoginUser);
                btnApply.Enabled = false;
                LockAllText(true);
            }
            else if (_isNew)
            {
                DataRow[] dr1 = dsUser.LoginUser.Select("UserName = '******'");
                if (dr1.Length > 0)
                {
                    MainErrorProvider.SetError(txtUserID, "Login ID already Used");
                    return;
                }
                else
                {
                    MainErrorProvider.SetError(txtUserID, null);
                }

                DataRow dr = dsUser.LoginUser.NewRow();
                dr["IID"]      = Guid.NewGuid();
                dr["UserName"] = txtUserID.Text.ToLower();
                dr["FullName"] = txtUserName.Text;
                dr["Password"] = txtpassword.Text;
                dr["Type"]     = cmbUserType.SelectedIndex + 1;
                dsUser.LoginUser.Rows.Add(dr);
                DataHelper.UpdateData(dsUser.LoginUser);
            }
        }
Esempio n. 18
0
 private bool ErrorFound()
 {
     if (string.IsNullOrEmpty(txtCompanyName.Text))
     {
         MainErrorProvider.SetError(txtCompanyName, "Input Comapny Name");
         return(true);
     }
     else
     {
         MainErrorProvider.SetError(txtCompanyName, null);
     }
     if (string.IsNullOrEmpty(txtAddress.Text))
     {
         MainErrorProvider.SetError(txtAddress, "Input Comapny Address");
         return(true);
     }
     else
     {
         MainErrorProvider.SetError(txtAddress, null);
     }
     return(false);
 }
Esempio n. 19
0
        private void txtInterestperInstallment_Leave(object sender, EventArgs e)
        {
            try
            {
                double d = double.Parse(txtInterestperInstallment.Text);
                MainErrorProvider.SetError(txtInterestperInstallment, null);
                txtAmountperInstallment.Text = (double.Parse(txtInterestperInstallment.Text) + double.Parse(txtCapitalperInstallment.Text)).ToString();

                double d1 = double.Parse(txtAmountperInstallment.Text);
                if (!string.IsNullOrEmpty(txtLoanDurationApproved.Text))
                {
                    txtTotalAmountPayable.Text = (d1 * double.Parse(txtLoanDurationApproved.Text)).ToString();
                    MainErrorProvider.SetError(txtLoanDurationApproved, null);
                }
                else
                {
                    MainErrorProvider.SetError(txtLoanDurationApproved, "Input Loan Duration");
                }
            }
            catch (Exception ex)
            {
                MainErrorProvider.SetError(txtInterestperInstallment, "Input Valid percentage");
            }
        }
Esempio n. 20
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtFullName.Text))
            {
                MainErrorProvider.SetError(txtFullName, "Input Member's Name");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFullName, null);
            }

            if (string.IsNullOrEmpty(txtFatherHusbandName.Text))
            {
                MainErrorProvider.SetError(txtFatherHusbandName, "Input Father/Husband's Name");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFatherHusbandName, null);
            }

            if (string.IsNullOrEmpty(txtAge.Text))
            {
                MainErrorProvider.SetError(txtAge, "Input Member's Age");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAge, null);
            }

            //if (string.IsNullOrEmpty(txtEnergencyContact.Text))
            //{
            //    MainErrorProvider.SetError(txtEnergencyContact, "Input Emergency Contact");
            //    return true;
            //}
            //else
            //    MainErrorProvider.SetError(txtEnergencyContact, null);

            if (string.IsNullOrEmpty(txtLAddress.Text) && string.IsNullOrEmpty(txtLVillage.Text))
            {
                MainErrorProvider.SetError(txtLVillage, "Input Input Present Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLVillage, null);
            }

            if (string.IsNullOrEmpty(txtPAddress.Text) && string.IsNullOrEmpty(txtPVillage.Text))
            {
                MainErrorProvider.SetError(txtPVillage, "Input Permanent Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtPVillage, null);
            }


            return(false);
        }
Esempio n. 21
0
        private bool ErrorFound()
        {
            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select Loan Applicant policy");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }

            if (string.IsNullOrEmpty(txtFormNumber.Text))
            {
                MainErrorProvider.SetError(txtFormNumber, "Input Appliation Form number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFormNumber, null);
            }

            if (string.IsNullOrEmpty(txtLegalDocument.Text))
            {
                MainErrorProvider.SetError(txtLegalDocument, "Input Legal document Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLegalDocument, null);
            }

            if (string.IsNullOrEmpty(txtLoanPurpose.Text))
            {
                MainErrorProvider.SetError(txtLoanPurpose, "Input Loan Purpose");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLoanPurpose, null);
            }

            if (cmbPolicyGranter1.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicyGranter1, "Select Loan Granter policy");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicyGranter1, null);
            }
            if (string.IsNullOrEmpty(txtLoanNumber.Text))
            {
                MainErrorProvider.SetError(txtLoanNumber, "Input Loan number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLoanNumber, null);
            }

            if (string.IsNullOrEmpty(txtVoucherNumber.Text))
            {
                MainErrorProvider.SetError(txtVoucherNumber, "Input voucher number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtVoucherNumber, null);
            }

            if (string.IsNullOrEmpty(txtLoanAmountApproved.Text))
            {
                MainErrorProvider.SetError(txtLoanAmountApproved, "Input Approved loan Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLoanAmountApproved, null);
            }

            if (string.IsNullOrEmpty(txtLoanDurationApproved.Text))
            {
                MainErrorProvider.SetError(txtLoanDurationApproved, "Input Approved loan Duration");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLoanDurationApproved, null);
            }

            if (string.IsNullOrEmpty(txtCapitalperInstallment.Text))
            {
                MainErrorProvider.SetError(txtCapitalperInstallment, "Input Capital per Installment");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtCapitalperInstallment, null);
            }

            if (string.IsNullOrEmpty(txtInterestperInstallment.Text))
            {
                MainErrorProvider.SetError(txtInterestperInstallment, "Input Interest per Installment");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtInterestperInstallment, null);
            }

            if (string.IsNullOrEmpty(txtAmountperInstallment.Text))
            {
                MainErrorProvider.SetError(txtAmountperInstallment, "Input Total amount per Installment");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAmountperInstallment, null);
            }

            return(false);
        }
Esempio n. 22
0
        private bool ErrorFound()
        {
            //if (string.IsNullOrEmpty(txtReceiptNo.Text))
            //{
            //    MainErrorProvider.SetError(txtReceiptNo, "Input Receipt number");
            //    return true;
            //}
            //else
            //    MainErrorProvider.SetError(txtReceiptNo, null);

            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select Policy number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }
            if (chkLoan.Checked && (double.Parse(txtLoan.Text) == 0) && (double.Parse(txtCapital.Text) == 0) && (double.Parse(txtInterest.Text) == 0))
            {
                MainErrorProvider.SetError(txtLoan, "Input Valid Amount");
                MainErrorProvider.SetError(txtCapital, "Input Valid Amount");
                MainErrorProvider.SetError(txtInterest, "Input Valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLoan, null);
                MainErrorProvider.SetError(txtCapital, null);
                MainErrorProvider.SetError(txtInterest, null);
            }

            if (chkDeposit.Checked && double.Parse(txtDeposit.Text) == 0)
            {
                MainErrorProvider.SetError(txtDeposit, "Input Valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtDeposit, null);
            }

            if (chkPassbookForm.Checked && double.Parse(txtPassbook.Text) == 0)
            {
                MainErrorProvider.SetError(txtPassbook, "Input Valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtPassbook, null);
            }


            if (chkAdmissionFee.Checked && double.Parse(txtAdmission.Text) == 0)
            {
                MainErrorProvider.SetError(txtAdmission, "Input valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAdmission, null);
            }

            if (chkOthers.Checked && double.Parse(txtOthers.Text) == 0)
            {
                MainErrorProvider.SetError(txtOthers, "Input valid Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtOthers, null);
            }
            if (!chkLoan.Checked && !chkOthers.Checked && !chkPassbookForm.Checked && !chkDeposit.Checked && !chkAdmissionFee.Checked)
            {
                MessageBox.Show("You Must collect some amount in the receipt", "Zero Receipt Amount", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(true);
            }
            return(false);
        }
Esempio n. 23
0
        private bool ErrorFound()
        {
            if (string.IsNullOrEmpty(txtFormNumber.Text))
            {
                MainErrorProvider.SetError(txtFormNumber, "Input Form Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFormNumber, null);
            }

            if (string.IsNullOrEmpty(txtFullName.Text))
            {
                MainErrorProvider.SetError(txtFullName, "Input Member's Name");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFullName, null);
            }

            if (string.IsNullOrEmpty(txtFatherHusbandName.Text))
            {
                MainErrorProvider.SetError(txtFatherHusbandName, "Input Father/Husband's Name");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFatherHusbandName, null);
            }

            if (string.IsNullOrEmpty(txtAge.Text))
            {
                MainErrorProvider.SetError(txtAge, "Input Member's Age");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtAge, null);
            }

            //if (string.IsNullOrEmpty(txtEnergencyContact.Text))
            //{
            //    MainErrorProvider.SetError(txtEnergencyContact, "Input Emergency Contact");
            //    return true;
            //}
            //else
            //    MainErrorProvider.SetError(txtEnergencyContact, null);

            if (string.IsNullOrEmpty(txtLAddress.Text) && string.IsNullOrEmpty(txtLVillage.Text))
            {
                MainErrorProvider.SetError(txtLVillage, "Input Input Present Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtLVillage, null);
            }

            if (string.IsNullOrEmpty(txtPAddress.Text) && string.IsNullOrEmpty(txtPVillage.Text))
            {
                MainErrorProvider.SetError(txtPVillage, "Input Permanent Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtPVillage, null);
            }

            if (string.IsNullOrEmpty(txtNomiName1.Text))
            {
                MainErrorProvider.SetError(txtNomiName1, "Input Nominee# 1 Name");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomiName1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAddress1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAddress1, "Input Nominee# 1 Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAddress1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAge1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAge1, "Input Nominee# 1 Age");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAge1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeRelation1.Text))
            {
                MainErrorProvider.SetError(txtNomineeRelation1, "Input Nominee# 1 Relation");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeRelation1, null);
            }

            if (string.IsNullOrEmpty(txtMembersCode.Text))
            {
                MainErrorProvider.SetError(txtMembersCode, "Input Members Code");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtMembersCode, null);
            }
            if (dtpEnlistedDate.EditValue == null)
            {
                MainErrorProvider.SetError(dtpEnlistedDate, "Select Enlisted date");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(dtpEnlistedDate, null);
            }

            if (!chkFDR.Checked)
            {
                if (string.IsNullOrEmpty(txtPolicyNumber.Text))
                {
                    MainErrorProvider.SetError(txtPolicyNumber, "Input Policy Number");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(txtPolicyNumber, null);
                }


                if (string.IsNullOrEmpty(txtSavingRatio.Text))
                {
                    MainErrorProvider.SetError(txtSavingRatio, "Input Saving Ratio");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(txtSavingRatio, null);
                }

                if (dtpEnlistedDate.DateTime.Year == 1 || dtpEnlistedDate.DateTime.Year == 9999)
                {
                    MainErrorProvider.SetError(dtpEnlistedDate, "Input Enlisted Date");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(dtpEnlistedDate, null);
                }
            }
            else
            {
                if (string.IsNullOrEmpty(txtFDRNumber.Text))
                {
                    MainErrorProvider.SetError(txtFDRNumber, "Input FDR Number");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(txtFDRNumber, null);
                }
                if (string.IsNullOrEmpty(txtFDRAmount.Text))
                {
                    MainErrorProvider.SetError(txtFDRAmount, "Input FDR Amount");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(txtFDRAmount, null);
                }

                if (string.IsNullOrEmpty(txtFDRMonthlyProfit.Text))
                {
                    MainErrorProvider.SetError(txtFDRMonthlyProfit, "Input Mothly profit amount");
                    return(true);
                }
                else
                {
                    MainErrorProvider.SetError(txtFDRMonthlyProfit, null);
                }
            }

            return(false);
        }
Esempio n. 24
0
        private bool ErrorFound()
        {
            if (cmbMemberCode.EditValue == null)
            {
                MainErrorProvider.SetError(cmbMemberCode, "Select a Member");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbMemberCode, null);
            }

            if (string.IsNullOrEmpty(txtFormNumber.Text))
            {
                MainErrorProvider.SetError(txtFormNumber, "Input Form Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtFormNumber, null);
            }

            if (string.IsNullOrEmpty(txtNomiName1.Text))
            {
                MainErrorProvider.SetError(txtNomiName1, "Input a Nominee");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomiName1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAddress1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAddress1, "Input Nominee Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAddress1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAge1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAge1, "Input Nominee Age");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAge1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeRelation1.Text))
            {
                MainErrorProvider.SetError(txtNomineeRelation1, "Input Nominee relation");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeRelation1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAmount1.Text) || double.Parse(txtNomineeAmount1.Text) == 0)
            {
                MainErrorProvider.SetError(txtNomineeAmount1, "Input Nominee Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAmount1, null);
            }
            return(false);
        }
Esempio n. 25
0
        private bool ErrorFound()
        {
            if (cmbPolicy.EditValue == null)
            {
                MainErrorProvider.SetError(cmbPolicy, "Select Policy Number");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(cmbPolicy, null);
            }

            if (string.IsNullOrEmpty(txtNomiName1.Text))
            {
                MainErrorProvider.SetError(txtNomiName1, "Input a Nominee");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomiName1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAddress1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAddress1, "Input Nominee Address");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAddress1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAge1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAge1, "Input Nominee Age");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAge1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeRelation1.Text))
            {
                MainErrorProvider.SetError(txtNomineeRelation1, "Input Nominee relation");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeRelation1, null);
            }

            if (string.IsNullOrEmpty(txtNomineeAmount1.Text))
            {
                MainErrorProvider.SetError(txtNomineeAmount1, "Input Nominee Amount");
                return(true);
            }
            else
            {
                MainErrorProvider.SetError(txtNomineeAmount1, null);
            }
            return(false);
        }