public void SaveOrder(ChoiceSaveOrder en, Order order) { switch (en) { case ChoiceSaveOrder.Sql: save = new TInsertAndQuestionSQL(); break; case ChoiceSaveOrder.Txt: save = new SaveFiles(); break; default: save = new TInsertAndQuestionSQL(); break; } save.AddOrder(order); }
public void SaveOrderList(ChoiceSaveOrder en, List <Order> orders) { switch (en) { case ChoiceSaveOrder.Sql: save = new TInsertAndQuestionSQL(); break; case ChoiceSaveOrder.Txt: save = new TSaveFiles(); break; default: save = new TInsertAndQuestionSQL(); break; } save.SaveHistoryOrders(orders); }