private void TxtFees_TextChanged(object sender, EventArgs e)
 {
     // Formatting the form:
     MathOperations.AmountZeroFormat(TxtFees);
     // Math operations:
     MathOperations.TemporaryLoan(TxtTotalAmount, TxtSettlementAmount, TxtTax, TxtPenalty, TxtFees, TxtRevenues, TxtTotalDiscount, TxtNetAmount, TxtAmountToPay, TxtPaidAmount);
 }
 private void TxtSettlementAmount_TextChanged(object sender, EventArgs e)
 {
     // Formatting the form:
     MathOperations.AmountZeroFormat(TxtSettlementAmount);
     if (ComboStatus.Text == "لم يتم تسويتها")
     {
         if (ComboDocNo.Text == "" || ComboLocation.Text == "" || ComboEmployee.Text == "" || TxtTotalAmount.Text == "" || TxtPeriod.Text == "" || TxtReason.Text == "")
         {
             BtnUpdate.Enabled = false;
         }
         else
         {
             BtnUpdate.Enabled = true;
         }
     }
     else
     {
         if (ComboDocNo.Text == "" || ComboLocation.Text == "" || ComboEmployee.Text == "" || TxtTotalAmount.Text == "" || TxtPeriod.Text == "" || TxtReason.Text == "" || TxtChequeNo.Text == "" || TxtSettlementAmount.Text == "0")
         {
             BtnUpdate.Enabled = false;
         }
         else
         {
             BtnUpdate.Enabled = true;
         }
     }
     // Math operations:
     MathOperations.TemporaryLoan(TxtTotalAmount, TxtSettlementAmount, TxtTax, TxtPenalty, TxtFees, TxtRevenues, TxtTotalDiscount, TxtNetAmount, TxtAmountToPay, TxtPaidAmount);
 }
 private void TxtTotalAmount_TextChanged(object sender, EventArgs e)
 {
     // Formatting the form:
     MathOperations.AmountZeroFormat(TxtTotalAmount);
     if (TxtDocNo.Text == "" || ComboLocation.Text == "" || ComboEmployee.Text == "" || TxtTotalAmount.Text == "" || TxtPeriod.Text == "" || TxtReason.Text == "")
     {
         BtnAdd.Enabled = false;
     }
     else
     {
         BtnAdd.Enabled = true;
     }
 }
 private void TxtDocNo_TextChanged(object sender, EventArgs e)
 {
     // Formatting the form:
     if (TxtDocNo.Text == "" || ComboLocation.Text == "" || ComboName.Text == "" || TxtDestination.Text == "" ||
         TxtPeriod.Text == "" || TxtTrans.Text == @"0" & TxtTravel.Text == @"0")
     {
         BtnAdd.Enabled = false;
     }
     else
     {
         BtnAdd.Enabled = true;
     }
     MathOperations.AmountZeroFormat(TxtTrans);
     MathOperations.AmountZeroFormat(TxtTravel);
 }
 private void TxtPaidAmount_TextChanged(object sender, EventArgs e)
 {
     // Formatting the form:
     MathOperations.AmountZeroFormat(TxtPaidAmount);
     try
     {
         decimal PaidAmount = decimal.Parse(TxtPaidAmount.Text);
         if (PaidAmount > 0)
         {
             TxtBill.Enabled = true;
         }
         else
         {
             TxtBill.Enabled = false;
             TxtBill.Text    = "";
         }
     }
     catch (Exception EX)
     {
         MessageBox.Show(EX.Message);
     }
     // Math operations:
     MathOperations.TemporaryLoan(TxtTotalAmount, TxtSettlementAmount, TxtTax, TxtPenalty, TxtFees, TxtRevenues, TxtTotalDiscount, TxtNetAmount, TxtAmountToPay, TxtPaidAmount);
 }
Esempio n. 6
0
 private void TxtDiscounts_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtDiscounts);
     MathOperations.NetDocBill(TxtAmount, TxtPercent, TxtTaxs, TxtDiscounts, TxtTotalDiscount, TxtNetAmount);
 }
Esempio n. 7
0
 private void TxtAmount_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtAmount);
     MathOperations.NetDocBill(TxtAmount, TxtPercent, TxtTaxs, TxtDiscounts, TxtTotalDiscount, TxtNetAmount);
     FormatBtnUpdate(ComboDocNo, TxtDocNo, ComboLocation, ComboDoctor, TxtAmount, TxtDesc);
 }
Esempio n. 8
0
 private void TxtTotalAmount_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtTotalAmount);
     FormatForm(TxtSettlementNo, ComboLocation, TxtTotalAmount, TxtReason);
 }
Esempio n. 9
0
 private void TxtInsurancePaid_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtInsurancePaid);
 }
Esempio n. 10
0
 private void TxtResDiscountAmount_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtResDiscountAmount);
 }
Esempio n. 11
0
 private void TxtInsurDiscountPercentage_TextChanged(object sender, EventArgs e)
 {
     MathOperations.AmountZeroFormat(TxtInsurDiscountPercentage);
     MathOperations.AfterPayProject(ComboInsuranceRefund, TxtAmount, TxtInsurAmount, TxtInsurDiscountPercentage,
                                    TxtInsuranceDiscountAmount, TxtInsurancePaid);
 }