Exemplo n.º 1
0
        public static ReportQuery_QueryModel GetQueryModel(int Report_Id = 0)
        {
            var service = new ReportQueryService();
            ReportQuery_QueryModel queryModels;

            queryModels = service.GetReportQuery_Query(Report_Id);

            return(queryModels);
        }
Exemplo n.º 2
0
        public ActionResult Detail()
        {
            int userId = (int)Session["userId"];

            reportQueryService = new ReportQueryService();
            List <ReportQueryModel> reportQueryModels;

            reportQueryModels = reportQueryService.GetModels(userId);

            return(View(VIEW_DETAIL, reportQueryModels));
        }
Exemplo n.º 3
0
        public ActionResult DetailPartial()
        {
            int userId = (int)Session["userId"];

            reportQueryService = new ReportQueryService();
            List <ReportQueryModel> reportQueryModels;

            reportQueryModels = reportQueryService.GetModels(userId);

            return(PartialView(VIEW_FORM_PARTIAL, reportQueryModels));
        }
Exemplo n.º 4
0
        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);
        }