Esempio n. 1
0
        public async Task <ActionResult> Index(string date)
        {
            if (String.IsNullOrEmpty(date))
            {
                var model = await m_orderDetail.GetOrderDetailsAsync();

                return(View(model));
            }
            else
            {
                var arr   = date.Split('-');
                var date1 = Factory.CreateDateTime(arr[0], arr[1], arr[2]);
                var model = await m_orderDetail.GetOrderDetailsByDateAsync(date1);

                return(View(model));
            }
        }
Esempio n. 2
0
        public ListOrderDetailsViewModel MapOrderDetailToOrderDetailViewModel()
        {
            ListOrderDetailsViewModel list = new ListOrderDetailsViewModel(m_orderDetail);
            var orders = m_orderDetail.GetOrderDetailsAsync();

            //foreach (OrderDetail o in orders)
            //{

            //}
            return(list);
        }