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)); } }
public ListOrderDetailsViewModel MapOrderDetailToOrderDetailViewModel() { ListOrderDetailsViewModel list = new ListOrderDetailsViewModel(m_orderDetail); var orders = m_orderDetail.GetOrderDetailsAsync(); //foreach (OrderDetail o in orders) //{ //} return(list); }