Ejemplo n.º 1
0
        private void g_PayCloseButton_Click(object sender, EventArgs e)
        {
            try
                {
                    string tableType = "";
                    if (m_iType == m_cCommonConstants.TableType)
                        tableType = "Table";
                    else
                        tableType = "TakeAway";

                    DataTable tempItemTable = new DataTable();

                    tempItemTable = MakeTableFromGridview(g_FoodDataGridView);
                    int drinksIndex = tempItemTable.Rows.Count;
                    tempItemTable.Merge(MakeTableFromGridview(g_BeverageDataGridView));
                    if (drinksIndex == tempItemTable.Rows.Count)
                        drinksIndex = -1;

                    CPaymentForm tempPaymentForm = new CPaymentForm(orderID, Double.Parse(g_AmountLabel.Text) - Double.Parse("0" + g_serviceCharge.Text), tableType, tempItemTable, decimal.Parse(g_DiscountLabel.Text), drinksIndex, m_TerminalName, m_OperatorName, g_serviceCharge.Text, decimal.Parse(lblMembershipDiscountValue.Text));
                    // CPaymentForm tempPaymentForm = new CPaymentForm(orderID, Double.Parse(g_AmountLabel.Text) , tableType, tempItemTable, decimal.Parse(g_DiscountLabel.Text), drinksIndex, m_TerminalName, m_OperatorName, g_serviceCharge.Text);
                    CPaymentForm.m_orderUserName = m_orderUserName;
                    tempPaymentForm.Show();

                    CFormManager.Forms.Push(this);
                    this.Hide();
                }
                catch (Exception exp)
                {
                    MessageBox.Show(exp.Message, RMSGlobal.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
        }
Ejemplo n.º 2
0
        private void g_PayCloseButton_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable tempItemTable = new DataTable();
                tempItemTable = DataGridViewToDataTable(g_FoodDataGridView);

                CPaymentForm tempPaymentForm = new CPaymentForm(orderID, Double.Parse(g_BalanceLabel.Text), "Tabs", tempItemTable, Double.Parse(g_DiscountLabel.Text),-1,"0");//0 for service charge added by baruri
                tempPaymentForm.Show();
                CFormManager.Forms.Push(this);
                this.Hide();

            }
            catch (Exception eee)
            {
            }
        }