public ActionResult ApproveUploadGis(OrganizationPrimaryKey organizationPrimaryKey, ApproveUploadGisViewModel viewModel) { var organization = organizationPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewApproveUploadGis(viewModel, organization)); } viewModel.UpdateModel(organization); HttpRequestStorage.DatabaseEntities.OrganizationBoundaryStagings.RemoveRange(organization .OrganizationBoundaryStagings); SetMessageForDisplay($"{FieldDefinition.Organization.GetFieldDefinitionLabel()} Boundary for {organization.GetDisplayNameAsUrl()} successfully updated."); return(new ContentResult()); }
public ActionResult ApproveUploadGis(FocusAreaPrimaryKey focusAreaPrimaryKey, ApproveUploadGisViewModel viewModel) { var focusArea = focusAreaPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewApproveUploadGis(viewModel, focusArea)); } viewModel.UpdateModel(focusArea); HttpRequestStorage.DatabaseEntities.FocusAreaLocationStagings.RemoveRange(focusArea .FocusAreaLocationStagings); SetMessageForDisplay($"{FieldDefinition.FocusArea.GetFieldDefinitionLabel()} Location for {focusArea.GetDisplayNameAsUrl()} successfully updated."); return(new ContentResult()); }