Exemple #1
0
        public List <SortProductScheduleViewModel> GetAllVMSearchingList(SearchPSSModel searchModel)
        {
            var tmp = _ProductScheduleShowRepository.Get(s => s.ShowDate.Day == searchModel.SearchDate.Day &&
                                                         s.ShowDate.Month == searchModel.SearchDate.Month &&
                                                         s.ShowDate.Year == searchModel.SearchDate.Year)
                      .OrderBy(s => s.ShowTimeInt)
                      .ThenBy(s => s.OrderNumber)
                      .Select(s => new SortProductScheduleViewModel
            {
                Id = s.Id,
                ContractDetailId = s.ContractDetailId,
                ShowTime         = s.ShowTime,
                ShowTimeInt      = s.ShowTimeInt.Value,
                OrderNumber      = s.OrderNumber,
                ShowDate         = Utilities.DateToFormatVNDate(s.ShowDate),
                ProductName      = s.ProductName,
                Quantity         = s.Quantity,
                TimeSlot         = s.TimeSlot,
                TimeSlotLength   = s.TimeSlotLength
            }).ToList();

            return(tmp);
        }
 private void BuildSearchModel()
 {
     searchModel            = new SearchPSSModel();
     searchModel.SearchDate = dtpOneDate.Value;
 }