Example #1
0
        public static GridBoxViewModel CreateGridViewModel()
        {
            var gridModel = new GridBoxViewModel()
            {
                GridName          = "GridBoxIsoResult",
                PagingRoute       = "isolator",
                PagingAction      = "search",
                BackgroundIconCss = "fa fa-laptop"
            };

            return(gridModel);
        }
Example #2
0
        public static GridBoxViewModel CreateOrderGridViewModel()
        {
            var gridModel = new GridBoxViewModel()
            {
                GridName               = "GridBoxOrderResult",
                PagingRoute            = "isolator",
                PagingAction           = "ordersearch",
                BackgroundIconCss      = "fa fa-medkit",
                IsBoxDraggable         = true,
                ShowBodyContentOnHover = true,
            };

            return(gridModel);
        }
        public GridBoxViewModel GetEntityHistory(int entityId, DateTime?fromDate, DateTime?toDate, int page = 1, int pageSize = 10)
        {
            var gridModel = new GridBoxViewModel()
            {
                GridName          = "GridBoxEntityResult",
                PagingRoute       = "scheduler",
                PagingAction      = "entityhistorysearch",
                BackgroundIconCss = "fa fa-history"
            };

            var patAppointments = repository.GetContext().PatientAppointments.Include(p => p.Patient)
                                  .Where(p => p.PatientId == entityId)
                                  .Where(p => (!fromDate.HasValue || p.AppointmentDateTime.Date >= fromDate) && (!toDate.HasValue || p.AppointmentDateTime.Date <= toDate))
                                  .OrderBy(p => p.AppointmentDateTime);

            gridModel.Rows = patAppointments.Select(BindHistoryGridData).ToPagedList(page, pageSize);

            return(gridModel);
        }