Пример #1
0
 private void FrmInvoiceReceipt_Load(object sender, EventArgs e)
 {
     if (_PaymentType == "Cash")
     {
         this.Text = "Sales Invoice Receipt (Cash)";
         DataTable dtCustomer = _objGeneralLedger.GetDataGeneralLedger(Convert.ToInt32(ClsGlobal.CashLedgerId));
         TxtCustomer.Text = dtCustomer.Rows[0]["GlDesc"].ToString();
         TxtCustomer.Tag  = Convert.ToInt32(ClsGlobal.CashLedgerId);
     }
     else if (_PaymentType == "Card")
     {
         this.Text = "Sales Invoice Receipt (Card)";
         DataTable dtCustomer = _objGeneralLedger.GetDataGeneralLedger(Convert.ToInt32(ClsGlobal.CardLedgerId));
         TxtCustomer.Text = dtCustomer.Rows[0]["GlDesc"].ToString();
         TxtCustomer.Tag  = Convert.ToInt32(ClsGlobal.CardLedgerId);
         // TxtCustomer.Text = "Card";
     }
     else if (_PaymentType == "Credit")
     {
         this.Text        = "Sales Invoice Receipt (Credit)";
         TxtCustomer.Text = "";
     }
     TxtBillAmount.Text = _billamount.ToString();
     TxtTenderAmount.Focus();
 }
Пример #2
0
 private void TxtTenderAmount_Validating(object sender, CancelEventArgs e)
 {
     if (string.IsNullOrEmpty(TxtTenderAmount.Text))
     {
         MessageBox.Show("Tender Amount  Cannot Left Balank...!", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         e.Cancel = true;
         TxtTenderAmount.Focus();
         return;
     }
     else if (Convert.ToDecimal(TxtTenderAmount.Text) < Convert.ToDecimal(TxtBillAmount.Text))
     {
         MessageBox.Show("Tender Amount Cannot be less then Bill Amount...!", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         e.Cancel = true;
         TxtTenderAmount.Focus();
         return;
     }
     TxtReturnAmount.Text = (Convert.ToDecimal(TxtTenderAmount.Text) - Convert.ToDecimal(TxtBillAmount.Text)).ToString();
 }
Пример #3
0
 public FrmInvoiceReceipt(string paymentType, string billamount)
 {
     InitializeComponent();
     _PaymentType = paymentType;
     _billamount  = billamount;
     if (paymentType == "Credit" || paymentType == "Card")
     {
         TxtCustomer.Enabled     = true;
         TxtTenderAmount.Enabled = false;
         TxtCustomer.TabStop     = true;
         TxtCustomer.Focus();
     }
     else
     {
         TxtCustomer.Enabled       = false;
         TxtCustomer.TabStop       = false;
         BtnSearchCustomer.Enabled = false;
         TxtTenderAmount.Enabled   = true;
         TxtTenderAmount.Focus();
     }
 }