Ejemplo n.º 1
0
        public ActionResult DraftsReplacedBySeeding()
        {
            FacilitySubmittalElementViewModel viewModel = new FacilitySubmittalElementViewModel();

            viewModel.FacilitySubmittalElementDraftsReplacedBySeeding = Repository.FacilitySubmittalElements.GetFSEWithDraftsReplacedBySeedingGridSearch(true, CurrentUserRoles);

            return(View(viewModel));
        }
Ejemplo n.º 2
0
        public ActionResult OrganizationFacilitySubmittalDrafts(int organizationId, int?CERSID)
        {
            //check if CERSID = 0 then set is null
            if (CERSID.HasValue && CERSID.Value == 0)
            {
                CERSID = null;
            }

            FacilitySubmittalElementViewModel viewModel = new FacilitySubmittalElementViewModel()
            {
                Entities = Repository.FacilitySubmittalElements.Search(CERSID: CERSID, organizationID: organizationId, status: SubmittalElementStatus.Draft)
            };

            return(View(viewModel));
        }
Ejemplo n.º 3
0
        public ActionResult OrganizationFacilitySubmittalHistory(int organizationId, int?CERSID)
        {
            Facility facility = null;

            if (CERSID != null)
            {
                facility = Repository.Facilities.GetByID(CERSID.Value);
            }

            FacilitySubmittalElementViewModel viewModel = new FacilitySubmittalElementViewModel()
            {
                Organization    = Repository.Organizations.GetByID(organizationId),
                Facility        = facility,
                SubmittedEvents = Repository.FacilitySubmittalElements.Search(organizationID: organizationId, CERSID: CERSID)
                                  .Where(s => s.FacilitySubmittalID.HasValue && s.OwningOrganizationID == organizationId)
                                  .GetSubmittalEvent(Repository)
                                  .OrderByDescending(o => o.SubmittedDate)
                                  //converting it to list sped up the UI loading tremendously
                                  .ToList(),
            };

            return(View(viewModel));
        }