public void GenerateDataAccordingToLastButtonPressed() { int buttonPressed = GetLastButtonPressed(); if (buttonPressed >= 10) { buttonPressed = buttonPressed - 10; ItemsToFetch itemsToFetch = (ItemsToFetch)buttonPressed; int orderId = GetSelectedOrderIdFromSession(); var data = _factory.FetchOrderItemData(itemsToFetch, orderId); _dataTable = DataTableCreator.ToDataTable(data.Cast <ITEM>().ToList()); } else { OrdersToFetch ordersToFetch = (OrdersToFetch)buttonPressed; var data = _factory.FetchDataForAdmin(ordersToFetch); _dataTable = DataTableCreator.ToDataTable(data.Cast <ORDERS>().ToList()); } }
public void ShowItemsInSelecetedOrder(ItemsToFetch itemsToFetch) { _view.SetDataSource = _model.FetchItemsData(itemsToFetch); _view.BindData(); _view.InfoMessage = _model.FetchItemDataInfoMessage(itemsToFetch); }
public string FetchItemDataInfoMessage(ItemsToFetch itemsToFetch) { LoadOrderItemDictionary(_uOW); var info = OrderItemData[itemsToFetch].InfoMessage; return(info); }
public IEnumerable <object> FetchOrderItemData(ItemsToFetch itemsToFetch, int orderId) { LoadOrderItemDictionary(_uOW); var data = OrderItemData[itemsToFetch].FetchItemDataForOrder(orderId); return(data); }
public IEnumerable <object> FetchItemsData(ItemsToFetch itemsToFetch) { int orderId = GetSelectedOrderIdFromSession(); var data = _factory.FetchOrderItemData(itemsToFetch, orderId); return(data); }
public IEnumerable <object> FetchItemsData(ItemsToFetch itemsToFetch) { SetLastButtonPressed((int)itemsToFetch + 10); int orderId = GetSelectedOrderIdFromSession(); var data = _factory.FetchOrderItemData(itemsToFetch, orderId); return(data); }
public string FetchItemDataInfoMessage(ItemsToFetch itemsToFetch) { var info = _factory.FetchItemDataInfoMessage(itemsToFetch); return(info); }