Example #1
0
 private void btnAccount_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtTender.Text != string.Empty && Convert.ToDouble(txtTender.Text) > 0)
         {
             frmPaymentAcc frm = new frmPaymentAcc();
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 AccountModel accItem = new AccountModel();
                 accItem.PaymentID = 4;
                 accItem.Total     = Convert.ToDouble(txtTender.Text);
                 UCAccPayment acc = new UCAccPayment();
                 acc.lblStt.Text        = "#" + CountUcPayMent().ToString();
                 acc.lblMethodType.Text = btnAccount.Text;
                 acc.lblTotal.Text      = "$" + money.Format2((Convert.ToDouble(txtTender.Text)) * 1000);
                 acc.Tag           = accItem;
                 acc.Click        += acc_Click;
                 OrderMain.CusItem = frm.itemS;
                 OrderMain.Account = Convert.ToInt32(Convert.ToDouble(txtTender.Text) * 1000);
                 addPayment(accItem);
                 flpPaymentType.Controls.Add(acc);
             }
         }
     }
     catch (Exception ex)
     {
         LogPOS.WriteLog("frmPayment::::::::::::::::::::btnAccount_Click:::::::::::::::::" + ex.Message);
     }
 }
Example #2
0
 private void btnAccount_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtTender.Text != string.Empty&& Convert.ToDouble(txtTender.Text)>0)
         {
             frmPaymentAcc frm = new frmPaymentAcc();
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 AccountModel accItem = new AccountModel();
                 accItem.PaymentID = 4;
                 accItem.Total = Convert.ToDouble(txtTender.Text);
                 UCAccPayment acc = new UCAccPayment();
                 acc.lblStt.Text = "#" + CountUcPayMent().ToString();
                 acc.lblMethodType.Text = btnAccount.Text;
                 acc.lblTotal.Text = "$" + money.Format2((Convert.ToDouble(txtTender.Text)) * 1000);
                 acc.Tag = accItem;
                 acc.Click += acc_Click;
                 OrderMain.CusItem = frm.itemS;
                 OrderMain.Account = Convert.ToInt32(Convert.ToDouble(txtTender.Text) * 1000);
                 addPayment(accItem);
                 flpPaymentType.Controls.Add(acc);
             }
         }
     }
     catch (Exception ex)
     {
         LogPOS.WriteLog("frmPayment::::::::::::::::::::btnAccount_Click:::::::::::::::::" + ex.Message);
     }
 }