public void Filing_Table() { for (int i = 0; i < TheDatabase.GetCommandDB().Count; i++) { Command_Data.Add(new ComandTabel() { IdComanda = TheDatabase.GetCommandDB()[i].IdComanda, Price = TheDatabase.GetCommandDB()[i].Price, CommandSent = TheDatabase.GetCommandDB()[i].CommandSent }); } }
public void Delete() { if (rowindex == -1) { MessageBox.Show("Please Select Something"); } else { int b = TheDatabase.GetCommandDB()[rowindex].IdComanda; TheDatabase.Delete_FromTable(b); Command_Data.RemoveAt(rowindex); int k = Product_Data.Count; for (int i = 0; i < k; i++) { Product_Data.RemoveAt(0); } } }
public void Delete_All() { if (MessageBox.Show("Delete all commands?", "Are you sure?", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No) { } else { TheDatabase.Delete_All_From_User(); int k = Command_Data.Count; for (int i = 0; i < k; i++) { Command_Data.RemoveAt(0); } int p = Product_Data.Count; for (int i = 0; i < p; i++) { Product_Data.RemoveAt(0); } } }