public JsonResult List(PropertyIdCriteria criteria)
        {
            var page = _serviceHistoryQueries.GetPageByPropertyId<WorkitemServicesDetail>(criteria);

            return Json(new
            {
                total = page.TotalPages,
                page = page.CurrentPage,
                records = page.TotalItems,
                rows = page.Items.Select(Mapper.Map<ServiceHistoryViewModel>)
            });
        }
        public JsonResult List(PropertyIdCriteria criteria)
        {
            var page = _propertyQueries.GetPageByPropertyId<PropertyServiceDetail>(criteria);

            return Json(new
                            {
                                total = page.TotalPages,
                                page = page.CurrentPage,
                                records = page.TotalItems,
                                rows = (from item in page.Items
                                        select new
                                                   {
                                                       id = item.PropertyId,
                                                       cell = new object[]
                                                                  {
                                                                      item.ServiceType,
                                                                      item.Quantity,
                                                                      item.Frequency,
                                                                      item.ClientFee,
                                                                      item.VendorFee,
                                                                      item.VendorName,
                                                                      item.ReceivedDate.ToDisplayDate(),
                                                                      item.StartDate.ToDisplayDate(),
                                                                      item.StopDate.ToDisplayDate(),
                                                                      item.VerifiedDate.ToDisplayDate(),
                                                                      item.WorkStopSentDate.ToDisplayDate(),
                                                                      item.WorkComplete,
                                                                      item.WorkCompleteDate.ToDisplayDate(),
                                                                      item.ConfirmedTurnOffDate.ToDisplayDate(),
                                                                      item.NotNeededFlag,
                                                                      item.FinalBillRequested,
                                                                      item.OrderedFlag,
                                                                      item.AccountNumber,
                                                                      item.ClientUnit,
                                                                      item.VendorUnit,
                                                                      item.ServiceNotes
                                                                  }
                                                   }).ToArray()

                            });
        }
Beispiel #3
0
        public JsonResult List(PropertyIdCriteria criteria)
        {
            var page = _propertyQueries.GetPageByPropertyId<WorkItemDetail>(criteria);

            return Json(new
            {
                total = page.TotalPages,
                page = page.CurrentPage,
                records = page.TotalItems,
                rows = (from item in page.Items
                        select new
                        {
                            id = item.PropertyId,
                            cell = new object[]{
                                           item.WorkOrderNumber,
                                           item.ServiceList,
                                           item.WorkItemCreateDate.ToShortDateString(),
                                           item.ItemType,
                                           item.VendorId,
                                           item.VendorName,
                                           item.WIStatusName,
                                           item.WorkAuthorizedDate.ToDisplayDate(),
                            }
                        }).ToArray()

            });
        }