Exemple #1
0
        public ViewResult ViewIndex(string gridDataUrl)
        {
            var firmaPage = FirmaPageTypeEnum.ActionItemIndexList.GetFirmaPage();
            var viewData  = new IndexViewData(CurrentFirmaSession, firmaPage, gridDataUrl);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public ActionResult Index()
        {
            var firmaPage = FirmaPageTypeEnum.SolicitationIndex.GetFirmaPage();
            var viewData  = new IndexViewData(CurrentFirmaSession, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public ViewResult Index()
        {
            var firmaPage = FirmaPage.GetFirmaPageByPageType(FirmaPageType.DNRCostShareTreatments);
            var viewData  = new IndexViewData(CurrentPerson, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #4
0
        public async Task <IActionResult> EditImage(IndexViewData data)
        {
            var fileUploadResponse = new DefaultServiceResponse();

            var viewModel = new IndexViewData();

            if (data.FormFileData != null)
            {
                var customerData = await UserManager.GetUserAsync(User);

                if (customerData != null)
                {
                    fileUploadResponse = await FileManagerService.LoadFileToTheServer(data.FormFileData, customerData.Id);
                }

                if (fileUploadResponse.ValidationErrors != null)
                {
                    foreach (var error in fileUploadResponse.ValidationErrors)
                    {
                        ModelState.AddModelError("", error);
                    }
                }

                viewModel.PathToTheInputImage = Path.Combine("../", "CustomersImages",
                                                             Path.GetFileName(fileUploadResponse.ResponseData.ToString()));

                Logger.LogInformation($"Path to the input image, uploaded by the customer - {viewModel.PathToTheInputImage}");
            }
            else
            {
                ModelState.AddModelError("", "In order to edit photo, you should first provide it");
            }

            return(View(viewModel));
        }
        public ViewResult Index()
        {
            var firmaPageTypeHomePage       = FirmaPageType.ToType(FirmaPageTypeEnum.HomePage);
            var firmaPageByPageTypeHomePage = FirmaPage.GetFirmaPageByPageType(firmaPageTypeHomePage);

            var firmaPageTypeHomePageAdditionalInfo       = FirmaPageType.ToType(FirmaPageTypeEnum.HomeAdditionalInfo);
            var firmaPageByPageTypeHomePageAdditionalInfo = FirmaPage.GetFirmaPageByPageType(firmaPageTypeHomePageAdditionalInfo);

            var firmaPageTypeHomePageMapInfo       = FirmaPageType.ToType(FirmaPageTypeEnum.HomeMapInfo);
            var firmaPageByPageTypeHomePageMapInfo = FirmaPage.GetFirmaPageByPageType(firmaPageTypeHomePageMapInfo);

            var firmaHomePageImages = HttpRequestStorage.DatabaseEntities.FirmaHomePageImages.ToList().OrderBy(x => x.SortOrder).ToList();

            var currentPersonCanViewProposals = CurrentPerson.CanViewProposals;
            var projectsToShow = ProjectMapCustomization.ProjectsForMap(CurrentPerson);

            var projectMapCustomization      = ProjectMapCustomization.CreateDefaultCustomization(projectsToShow, currentPersonCanViewProposals);
            var projectLocationsLayerGeoJson = new LayerGeoJson($"{FieldDefinition.ProjectLocation.GetFieldDefinitionLabelPluralized()}", Project.MappedPointsToGeoJsonFeatureCollection(projectsToShow, false, true), "red", 1, LayerInitialVisibility.Show);
            var projectLocationsMapInitJson  = new ProjectLocationsMapInitJson(projectLocationsLayerGeoJson,
                                                                               projectMapCustomization, "ProjectLocationsMap")
            {
                AllowFullScreen = false,
                Layers          = HttpRequestStorage.DatabaseEntities.Organizations.GetBoundaryLayerGeoJson().Where(x => x.LayerInitialVisibility == LayerInitialVisibility.Show).ToList()
            };
            var projectLocationsMapViewData = new ProjectLocationsMapViewData(projectLocationsMapInitJson.MapDivID, ProjectColorByType.ProjectStage.DisplayName, MultiTenantHelpers.GetTopLevelTaxonomyTiers(), currentPersonCanViewProposals);

            var featuredProjectsViewData = new FeaturedProjectsViewData(HttpRequestStorage.DatabaseEntities.Projects.Where(x => x.IsFeatured).ToList().GetActiveProjectsVisibleToUser(CurrentPerson));

            var viewData = new IndexViewData(CurrentPerson, firmaPageByPageTypeHomePage, firmaPageByPageTypeHomePageAdditionalInfo, firmaPageByPageTypeHomePageMapInfo, featuredProjectsViewData, projectLocationsMapViewData, projectLocationsMapInitJson, firmaHomePageImages);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        private ViewResult IndexImpl()
        {
            var firmaPage = FirmaPageTypeEnum.ManageContactTypes.GetFirmaPage();
            var viewData  = new IndexViewData(CurrentFirmaSession, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #7
0
        public async Task <IActionResult> ModifyPhoto(IndexViewData data)
        {
            if (!string.IsNullOrEmpty(data.PathToTheInputImage))
            {
                var customerData = await UserManager.GetUserAsync(User);

                var fileResponse = await FileManagerService.ModifyFile(new ModifyModel {
                    UserId            = customerData.Id,
                    OutputFileType    = data.SelectedResponseFileFormat,
                    SelectedOperation = data.SelectedFileOperation,
                    Intesivity        = data.Intensity,
                    UseFrame          = data.UseFrame
                });

                Logger.LogInformation($"Path to the result image, uploaded by the customer - {fileResponse.ResponseData.ToString()}");

                return(View("EditImage", new IndexViewData()
                {
                    PathToTheInputImage = "../" + data.PathToTheInputImage,
                    PathToTheResultImage = fileResponse.ResponseData.ToString()
                }));
            }
            else
            {
                ModelState.AddModelError("", "In order to edit photo, you should first provide it");

                return(View("EditImage", new IndexViewData()));
            }
        }
        public ViewResult Index()
        {
            var firmaPage = FirmaPageTypeEnum.EvaluationList.GetFirmaPage();
            var viewData  = new IndexViewData(CurrentFirmaSession, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public ViewResult Index()
        {
            var treatmentBMPTypes = HttpRequestStorage.DatabaseEntities.TreatmentBMPTypes.ToList();
            var neptunePage       = NeptunePage.GetNeptunePageByPageType(NeptunePageType.TreatmentBMPType);
            var viewData          = new IndexViewData(CurrentPerson, neptunePage, treatmentBMPTypes);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public async Task <IndexViewModel> GetJournalsIndexViewModelAsync()
        {
            IEnumerable <JournalDTO> journals = await service.GetAllAsyncWithMentor();

            IndexViewData  viewModelData = new IndexViewData(journals);
            IndexViewModel viewModel     = viewFactory.CreateView <IndexViewData, IndexViewModel>(viewModelData);

            return(viewModel);
        }
        public async Task <IndexViewModel> GetIndexViewModelAsync()
        {
            IEnumerable <StudentDTO> students = await studentService.GetAllAsync();

            var            pageData  = new IndexViewData(students);
            IndexViewModel viewModel = viewFactory.CreateView <IndexViewData, IndexViewModel>(pageData);

            return(viewModel);
        }
        public ViewResult Index()
        {
            var allMethods = FindAttributedMethods(typeof(PowerBIController), typeof(WebServiceNameAndDescriptionAttribute));
            var serviceDocumentationList = allMethods.Select(c => new WebServiceDocumentation(c)).OrderBy(c => c.Name).ToList();
            var webServiceAccessToken    = new WebServiceToken(CurrentPerson.WebServiceAccessToken.ToString());
            var viewData = new IndexViewData(CurrentPerson, webServiceAccessToken, serviceDocumentationList);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #13
0
        public async Task <IndexViewModel> GetAttendancesIndexViewModelAsync()
        {
            IEnumerable <AttendanceDTO> attendances = await attendanceService.GetAllAsyncWithDayAndStudents();

            var            viewModelData = new IndexViewData(attendances);
            IndexViewModel viewModel     = viewFactory.CreateView <IndexViewData, IndexViewModel>(viewModelData);

            return(viewModel);
        }
Exemple #14
0
        public ViewResult Index()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.LandUseBlock);
            var landUseBlockBulkUploadUrl = SitkaRoute <LandUseBlockUploadController> .BuildUrlFromExpression(x => x.UpdateLandUseBlockGeometry());

            var viewData = new IndexViewData(CurrentPerson, neptunePage, landUseBlockBulkUploadUrl);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public async Task <IndexViewModel> GetIndexViewModelAsync()
        {
            IEnumerable <SubmissionDTO> submissions = await service.GetAllWithStudentAssignmentSubmitFileAsync();

            var            viewModelData = new IndexViewData(submissions);
            IndexViewModel viewModel     = viewFactory.CreateView <IndexViewData, IndexViewModel>(viewModelData);

            return(viewModel);
        }
Exemple #16
0
        public ViewResult Index()
        {
            var firmaPage     = FirmaPageTypeEnum.ProjectStewardOrganizationList.GetFirmaPage();
            var organizations = HttpRequestStorage.DatabaseEntities.Organizations.ToList().Where(x => x.CanBeAnApprovingOrganization()).OrderBy(x => x.GetDisplayName())
                                .ToList();
            var viewData = new IndexViewData(CurrentFirmaSession, organizations, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #17
0
        public async Task <IndexViewModel> GetIndexViewModelAsync()
        {
            IEnumerable <AssignmentDTO> assignments = await assignmentService.GetAllWithAssignmentFileCreatorAndSubmissionsAsync();

            IndexViewData  viewModelData = new IndexViewData(assignments);
            IndexViewModel viewModel     = viewFactory.CreateView <IndexViewData, IndexViewModel>(viewModelData);

            return(viewModel);
        }
Exemple #18
0
        public ViewResult Index()
        {
            var webServicesListUrl = SitkaRoute <WebServicesController> .BuildUrlFromExpression(x => x.List());

            var getWebServiceAccessTokenUrl = SitkaRoute <WebServicesController> .BuildUrlFromExpression(x => x.GetWebServiceAccessToken(CurrentPerson));

            var viewData = new IndexViewData(CurrentPerson, CurrentPerson.WebServiceAccessToken, webServicesListUrl, getWebServiceAccessTokenUrl);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #19
0
        public ActionResult Index()
        {
            ViewDataBase masterData = (ViewDataBase)this.ControllerContext.Controller.TempData["ViewData"];

            IndexViewData viewData = new IndexViewData(masterData.SiteMasterViewData);

            viewData.Text = "Welcome to ASP.NET MVC!";

            return(View(viewData));
        }
        public ViewResult Index()
        {
            var neptunePage             = NeptunePage.GetNeptunePageByPageType(NeptunePageType.WaterQualityMaintenancePlan);
            var wqmpGridSpec            = new WaterQualityManagementPlanIndexGridSpec(CurrentPerson);
            var verificationNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.WaterQualityMaintenancePlanOandMVerifications);
            var verificationGridSpec    = new WaterQualityManagementPlanVerificationGridSpec(CurrentPerson);
            var viewData = new IndexViewData(CurrentPerson, neptunePage, wqmpGridSpec, verificationNeptunePage, verificationGridSpec);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemple #21
0
        public ActionResult Index()
        {
            var data = _photostudioService.Where();

            var model = new IndexViewData
            {
                Page = data
            };

            return(View(model));
        }
        // GET: /Adds/
        public async Task <ActionResult> Index()
        {
            var ads = await _db.Ads.ToListAsync();

            var model = new IndexViewData
            {
                Page = { Elements = ads.As <IList <AdViewModel.Details> >() }
            };

            return(View(model));
        }
Exemple #23
0
        public async Task <IndexViewModel> GetWorkDaysIndexViewModel()
        {
            IEnumerable <WorkDayDTO> workDayDTOs = await workDayService.GetAllAsync();

            IEnumerable <WorkDayViewModel> workDayViewModels = viewModelFactory.CreateView <IEnumerable <WorkDayDTO>, IEnumerable <WorkDayViewModel> >(workDayDTOs);

            var            viewModelData = new IndexViewData(workDayDTOs);
            IndexViewModel viewModel     = viewModelFactory.CreateView <IndexViewData, IndexViewModel>(viewModelData);

            return(viewModel);
        }
        // GET: /Masterclass/
        public ActionResult Index()
        {
            var data = _masterclassService.Where();

            var model = new IndexViewData
            {
                Page = data
            };

            return(View(model));
        }
Exemple #25
0
        public ViewResult Index()
        {
            var firmaPage          = FirmaPageTypeEnum.WebServicesIndex.GetFirmaPage();
            var webServicesListUrl = SitkaRoute <WebServicesController> .BuildUrlFromExpression(x => x.List());

            var getWebServiceAccessTokenUrl = !CurrentFirmaSession.IsAnonymousOrUnassigned() ? SitkaRoute <WebServicesController> .BuildUrlFromExpression(x => x.GetWebServiceAccessToken(CurrentPerson)) : null;

            var viewData = new IndexViewData(CurrentFirmaSession, CurrentPerson?.WebServiceAccessToken, webServicesListUrl, getWebServiceAccessTokenUrl, firmaPage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public ViewResult Index()
        {
            var neptunePage          = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManagerDashboard);
            var fieldVisitCount      = HttpRequestStorage.DatabaseEntities.vFieldVisitDetaileds.GetProvisionalFieldVisits(CurrentPerson).Count;
            var treatmentBMPsCount   = HttpRequestStorage.DatabaseEntities.TreatmentBMPs.GetProvisionalTreatmentBMPs(CurrentPerson).Count;
            var bmpDelineationsCount = HttpRequestStorage.DatabaseEntities.Delineations
                                       .GetProvisionalBMPDelineations(CurrentPerson).Count;
            var viewData = new IndexViewData(CurrentPerson, neptunePage, fieldVisitCount, treatmentBMPsCount, bmpDelineationsCount);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public async Task <ActionResult> Index()
        {
            var data = _photorentService.Where();

            var model = new IndexViewData
            {
                Page = data
            };

            return(View(model));
        }
        // GET: /PhototechnicsModel/
        public ActionResult Index(int pageSize = 20, int @from = 0)
        {
            var data = _pageService.Where();

            var model = new IndexViewData
            {
                Page = data
            };

            return(View(model));
        }
Exemple #29
0
        public ActionResult Index()
        {
            IIndexViewData viewData = new IndexViewData();

             viewData.Message = "Welcome to ASP.NET MVC!";
             viewData.Message2 = "And welcome again!";
             viewData.Message3 = "And welcome yet again!";

             TypeViewData.Add<IIndexViewData>(viewData);

             return View(TypeViewData);
        }
 // GET: Default/Wall
 public ActionResult Index(Guid id)
 {
     try
     {
         var model = new IndexViewData { Item = _wallService.GetDetails(id) };
         return View(model);
     }
     catch (Exception ex)
     {
         return HttpNotFound();
     }
 }
Exemple #31
0
        public async Task <IActionResult> Build(int id)
        {
            var modelContainer = new IndexViewData();

            modelContainer.Members  = _context.Member;
            modelContainer.Hymns    = _context.Hymn;
            modelContainer.Speakers = _context.Speakers.Where(i => i.SMPID == id).ToList();
            modelContainer.SMP      = _context.SMP.Where(i => i.ID == id).FirstOrDefault();
            modelContainer.Ward     = _context.Ward.
                                      Where(i => i.ID == modelContainer.SMP.WardID).FirstOrDefault();
            return(View(modelContainer));
        }