public List <OrderProperties> getOrders(string vendorId, string orderStatus)
 {
     if (orderStatus == null)
     {
         return(customerOrderDataHandler.getMultipleOrdersInfo(vendorId, null));
     }
     else
     {
         return(customerOrderDataHandler.getMultipleOrdersInfo(vendorId, orderStatus));
     }
 }
        private void getProcessedOrder(string vendorInfo, string orderStatus)
        {
            List <OrderProperties> orderList = orderDbProcessor.getMultipleOrdersInfo(vendorInfo, orderStatus);

            foreach (OrderProperties props in orderList)
            {
                if (processedOrderDictionary.Keys.Contains(props.Order_Id))
                {
                    List <OrderProperties> existingPropertiesInDictionary;
                    processedOrderDictionary.TryGetValue(props.Order_Id, out existingPropertiesInDictionary);
                    existingPropertiesInDictionary.Add(props);
                    processedOrderDictionary.Remove(props.Order_Id);
                    processedOrderDictionary.Add(props.Order_Id, existingPropertiesInDictionary);
                }
                else
                {
                    List <OrderProperties> newOrderProperties = new List <OrderProperties>();
                    newOrderProperties.Add(props);
                    processedOrderDictionary.Add(props.Order_Id, newOrderProperties);

                    OrderGridFields gridData = new OrderGridFields();
                    gridData.orderId = props.Order_Id;
                    gridData.balance = props.Balance_Amount.ToString("c");
                    gridData.date    = props.OrderDate;
                    gridData.total   = props.Total_Price.ToString("c");
                    gridRowDataList.Add(gridData);
                }
            }
        }
Exemple #3
0
 public List <OrderProperties> getOrders(string orderStatus)
 {
     return(orderProcessHandler.getMultipleOrdersInfo(null, orderStatus));
 }