public ActionResult AppsHistory() { AdapApplicantRpt1 aar1 = new AdapApplicantRpt1(); aar1.ReportName = "History"; aar1.ShowFullHistory = true; AdapController ac = new AdapController(formsRepo); ac.ControllerContext = ControllerContext; return(ac.Report1(aar1)); }
public ActionResult Clinic() { if (!SessionHelper.IsUserLoggedIn) { return(RedirectToAction("Index", "Account", null)); } bool accessLevel = UAS.Business.UAS_Business_Functions.hasPermission(0, "RptsExpts"); if (!accessLevel) { return(RedirectToAction("AdapPortal", "ADAP", new { userId = SessionHelper.LoginStatus.UserID })); } AuthenticationClient webclient = new AuthenticationClient(); AdapApplicantRpt1 aar1 = new AdapApplicantRpt1(); aar1.ActiveUserName = SessionHelper.LoginStatus.FirstName + " " + SessionHelper.LoginStatus.LastName; aar1.ReportName = "Clinic Administration"; // AdapApplicatnRpt1 was originally written for Report1, but the various fields make it versatile // formResultId stores the lookupMasterId, and teamId stores EnterpriseId for the Clinic Report. aar1.formResultId = formsRepo.GetLookupMastersByLookupCode("ADAP_CLINIC").lookupMasterId; aar1.teamId = SessionHelper.LoginStatus.EnterpriseID; aar1.TeamDDL = new List <Group>();//webclient.GetGroupsByEnterpriseID(SessionHelper.LoginStatus.EnterpriseID); foreach (var v in formsRepo.GetLookupMastersByLookupCode("ADAP_CLINIC").def_LookupDetail .Where(f => (aar1.teamId > 0) ? aar1.teamId == f.EnterpriseID : true) .GroupBy(f => f.GroupID) .Select(grp => grp.First()) .ToList()) { aar1.TeamDDL.Add(webclient.getGroup(Convert.ToInt32(v.GroupID))); } aar1.TeamDDL.Insert(0, new Group() { GroupID = -1, GroupName = "All" }); webclient.Close(); return(View("~/Views/COADAP/ClinicAdmin.cshtml", aar1)); }