public ActionResult Index(FilterInformation filterInfo)
        {
            var agentsRepository = _agentViewRepository.Get(filterInfo);
            var model = new AgentIndexModel(agentsRepository);

            return View(model);
        }
        public async Task<ActionResult> Index(FilterInformation info)
        {
            var isAdmin = _membershipService.IsInRole(CurrentUser, ApplicationRole.Admin);
            var existingProcedures = await isAdmin ? _patientProcedureViewRepository.Get(info) 
                                                   : _patientProcedureViewRepository.GetUserProcedures(CurrentUser.OwnerId, info);

            return View(new PatientProcedureIndexModel(existingProcedures));
        }
 public async Task<ActionResult> Index(FilterInformation info)
 {
     var isAdmin = await _membershipService.IsInRole(CurrentUser, ApplicationRole.Admin);
     
     var patients = isAdmin ? _patientViewRepository.Get(info) 
                            : _patientViewRepository.GetPatientsForAgent(CurrentUser.OwnerId, info);
     
     var model = new PatientIndexModel(patients);
     return View(model);
 }
        public ActionResult Index(FilterInformation info)
        {
            var appointments = _viewRepository.GetAppointmentsForAgent(CurrentUser.OwnerId, info);
            var model = new AppointmentsIndexModel(appointments);

            return View(model);
        }
 public ActionResult Index(FilterInformation filter)
 {
     var procedures = _procedureRepository.Get(filter);
     return View(new ProcedureIndexModel(procedures));
 }
 public ActionResult Inbox(FilterInformation info)
 {
     var pagedResult = GetInboxMessages(info);
     return View(new MessageIndexModel(pagedResult));
 }
 private PagedResult<IEnumerable<MessageEditModel>> GetOutBoxMessages(FilterInformation info)
 {
     var loggedUserId = CurrentUser.OwnerId;
     return _viewRepository.GetOutboxMessagesForUser(loggedUserId, info);
 }
        public ActionResult Sent(FilterInformation info)
        {
            var pagedResult = GetOutBoxMessages(info);
            var model = new MessageIndexModel(pagedResult);

            return View(model);
        }
 public PartialViewResult PartialSent(FilterInformation info)
 {
     var pagedResult = GetOutBoxMessages(info);
     return PartialView("Partials/_PartialOutboxMessageList", new PagedViewModel<MessageEditModel>
                                                              {
                                                                  Items = pagedResult.Result,
                                                                  Page = pagedResult.PageNumber,
                                                                  PageSize = pagedResult.PageSize,
                                                                  TotalPages = pagedResult.TotalPages,
                                                                  TotalRecords = pagedResult.TotalItems,
                                                                  SortMode = pagedResult.SortOrder,
                                                                  OrderColumn = pagedResult.SortColumn
                                                              });
 }