Exemplo n.º 1
0
        public void PayPartialPaymentDone()
        {
            foreach (IProduct p in newFormPayPartial.tablePartial.Products)
            {
                soldProducts.Add(p);
                tablesInUse.Where(x =>
                                  x.NumberOfTable == newFormPayPartial.tablePartial.NumberOfTable).
                FirstOrDefault().Products.Remove(p);
            }

            if (tablesInUse.Where(x =>
                                  x.NumberOfTable == newFormPayPartial.tablePartial.NumberOfTable).
                FirstOrDefault().Products.Count == 0)
            {
                tablesInUse.Remove(tablesInUse.Where(x =>
                                                     x.NumberOfTable == newFormPayPartial.tablePartial.NumberOfTable).
                                   FirstOrDefault());
            }

            newFormPayPartial = null;

            SetAreasMenu();
            tablesListBox.Visible = false;

            SetCategoriesMenu(pageCategories);
            productsListBox.Visible = false;
        }
Exemplo n.º 2
0
        private void payPartialButton_Click(object sender, EventArgs e)
        {
            int numberOfTable = selectedTable.NumberOfTable;

            IUsedTable table = tablesInUse.Where(x => x.NumberOfTable == numberOfTable).FirstOrDefault();

            newFormPayPartial = new PayPartial(this);
            newFormPayPartial.SendData(table);
            newFormPayPartial.FormBorderStyle = FormBorderStyle.FixedDialog;
            newFormPayPartial.MaximizeBox     = false;
            newFormPayPartial.MinimizeBox     = false;
            newFormPayPartial.StartPosition   = FormStartPosition.CenterScreen;
            newFormPayPartial.ShowDialog();
        }
Exemplo n.º 3
0
 public void PayPartialFormClosed()
 {
     newFormPayPartial = null;
 }