예제 #1
0
        private void lblOrders_Click(object sender, EventArgs e)
        {
            if (!mboIsInTransaction)
            {
                MessageBox.Show("No active transaction found.", "RetailPlus", MessageBoxButtons.OK);
                return;
            }
            if (mboIsInTransaction)
            {
                decimal decRetValue = 0;
                int iNoOfPax = Int32.TryParse(lblOrders.Tag.ToString(), out iNoOfPax) ? iNoOfPax : 0;
                if (ShowNoControl(this, out decRetValue, decimal.Parse(iNoOfPax.ToString()), "Enter no of Pax to pay.") == System.Windows.Forms.DialogResult.OK)
                {
                    try
                    {
                        iNoOfPax = Int32.TryParse(decRetValue.ToString(), out iNoOfPax) ? iNoOfPax : 0;
                        lblOrders.Text = Constants.C_RESTOPLUS_CUSTOMER_ORDERS + ": " + iNoOfPax.ToString() + " PAX";
                        lblOrders.Tag = iNoOfPax.ToString();
                        mclsSalesTransactionDetails.PaxNo = iNoOfPax;
                        Data.SalesTransactions clsSalesTransactions = new Data.SalesTransactions();
                        clsSalesTransactions.UpdatePaxNo(mclsSalesTransactionDetails.TransactionID, iNoOfPax);
                        clsSalesTransactions.CommitAndDispose();

                        ComputeSubTotal(); setTotalDetails();
                    }
                    catch (Exception ex) { throw ex; }
                    finally { txtBarCode.Focus(); }
                }
            }
        }
예제 #2
0
		private void cmdPaxDeduct_Click(object sender, EventArgs e)
		{
			try
			{
				if (mboIsInTransaction)
				{
					int iNoOfPax = 1;
					try { iNoOfPax = int.Parse(lblOrders.Tag.ToString()); }
					catch { }
					if (iNoOfPax <= 1)
					{ iNoOfPax = 1; }
					else
					{ iNoOfPax -= 1; }
					lblOrders.Text = Constants.C_RESTOPLUS_CUSTOMER_ORDERS + ": " + iNoOfPax.ToString() + " PAX";
					lblOrders.Tag = iNoOfPax.ToString();
                    mclsSalesTransactionDetails.PaxNo = iNoOfPax;
					Data.SalesTransactions clsSalesTransactions = new Data.SalesTransactions();
					clsSalesTransactions.UpdatePaxNo(mclsSalesTransactionDetails.TransactionID, iNoOfPax);
					clsSalesTransactions.CommitAndDispose();

                    ComputeSubTotal(); setTotalDetails();
				}
			}
			catch (Exception ex) { throw ex; }
			finally { txtBarCode.Focus(); }
		}