示例#1
0
        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());
            }
        }
示例#2
0
        public void ShowItemsInSelecetedOrder(ItemsToFetch itemsToFetch)
        {
            _view.SetDataSource = _model.FetchItemsData(itemsToFetch);

            _view.BindData();

            _view.InfoMessage = _model.FetchItemDataInfoMessage(itemsToFetch);
        }
示例#3
0
        public string FetchItemDataInfoMessage(ItemsToFetch itemsToFetch)
        {
            LoadOrderItemDictionary(_uOW);

            var info = OrderItemData[itemsToFetch].InfoMessage;

            return(info);
        }
示例#4
0
        public IEnumerable <object> FetchOrderItemData(ItemsToFetch itemsToFetch, int orderId)
        {
            LoadOrderItemDictionary(_uOW);

            var data = OrderItemData[itemsToFetch].FetchItemDataForOrder(orderId);

            return(data);
        }
示例#5
0
        public IEnumerable <object> FetchItemsData(ItemsToFetch itemsToFetch)
        {
            int orderId = GetSelectedOrderIdFromSession();

            var data = _factory.FetchOrderItemData(itemsToFetch, orderId);

            return(data);
        }
示例#6
0
        public IEnumerable <object> FetchItemsData(ItemsToFetch itemsToFetch)
        {
            SetLastButtonPressed((int)itemsToFetch + 10);

            int orderId = GetSelectedOrderIdFromSession();

            var data = _factory.FetchOrderItemData(itemsToFetch, orderId);

            return(data);
        }
示例#7
0
        public string FetchItemDataInfoMessage(ItemsToFetch itemsToFetch)
        {
            var info = _factory.FetchItemDataInfoMessage(itemsToFetch);

            return(info);
        }