コード例 #1
0
ファイル: Form1.cs プロジェクト: vebin/NewPOS
        private void btnPay_Click(object sender, EventArgs e)
        {
            try
            {
                if (Total == 0)
                {
                    MessageBox.Show("Sorry, Your Payment Cart is Empty. Please select a product first!");
                    return;
                }
                PayForm pf1 = new PayForm();

                pf1.AmountToPay = Total;

                pf1.PayedEv += pf1_PayedEv;

                pf1.ShowDialog();

                for (int i = 0; i < 10; i++)
                {
                    try
                    {
                        tblProduct selected = (tblProduct)(lbProductsToBuy.SelectedItem);

                        Total -= (decimal)selected.productPrice;

                        products.Remove(selected);
                    }
                    catch
                    {
                        //MessageBox.Show("Nothing to delete !");
                    }
                }
            }
            catch { }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: senthil0880/JC-POS
 private void payButton_Click(object sender, EventArgs e)
 {
     PayForm f1 = new PayForm();
     f1.AmountToPay = 97.5M;
     Dictionary<string, string> transInfo = new Dictionary<string, string>();
     transInfo.Add("retailerID", "RTA01V0100001");
     string _transIDTemp = "ASC01XY0000" + transactionCounter.ToString();
     transInfo.Add("transactionID", _transIDTemp);
     f1.transactionInfo = transInfo;
     f1.Show();
 }