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; }
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(); }
public void PayPartialFormClosed() { newFormPayPartial = null; }