public static ReportQuery_QueryModel GetQueryModel(int Report_Id = 0) { var service = new ReportQueryService(); ReportQuery_QueryModel queryModels; queryModels = service.GetReportQuery_Query(Report_Id); return(queryModels); }
public ActionResult Detail() { int userId = (int)Session["userId"]; reportQueryService = new ReportQueryService(); List <ReportQueryModel> reportQueryModels; reportQueryModels = reportQueryService.GetModels(userId); return(View(VIEW_DETAIL, reportQueryModels)); }
public ActionResult DetailPartial() { int userId = (int)Session["userId"]; reportQueryService = new ReportQueryService(); List <ReportQueryModel> reportQueryModels; reportQueryModels = reportQueryService.GetModels(userId); return(PartialView(VIEW_FORM_PARTIAL, reportQueryModels)); }
public void ClassSetUp() { _identityId = Guid.NewGuid(); var identityContext = new IdentityContext() { IdentityId = Guid.NewGuid() }; _authorizationPolicy = new Mock <IServiceAuthorizationPolicy>(); _authorizationPolicy.Setup(mock => mock.RequireViewPermissions(It.IsAny <IdentityContext>(), It.IsAny <Guid>(), It.IsAny <ModuleType>())); _identityProvider = new Mock <IServiceIdentityProvider>(); _identityProvider.Setup(x => x.GetPrincipalIdentifier()).Returns(identityContext.IdentityId); _identityProvider.Setup(x => x.GetIdentityContext()).Returns(identityContext); _factory = new MockRepository(MockBehavior.Loose); _reportsUnitOfWork = _factory.Create <IReportsUnitOfWork>(); SetUpReport(); SetUpAgencyReference(); SetUpAttachmentToReport(); _reportQueryService = new ReportQueryService(_reportsUnitOfWork.Object, Mock.Of <ILog>(), _authorizationPolicy.Object, _identityProvider.Object); }