public PartialViewResult DeleteProjectCustomAttributeType(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(projectCustomAttributeType.ProjectCustomAttributeTypeID); return(ViewDeleteProjectCustomAttributeType(projectCustomAttributeType, viewModel)); }
public ViewResult Detail(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; var viewData = new DetailViewData(CurrentPerson, projectCustomAttributeType); return(RazorView <Detail, DetailViewData>(viewData)); }
public PartialViewResult Edit(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; var viewModel = new EditViewModel(projectCustomAttributeType); return(ViewEdit(viewModel, projectCustomAttributeType)); }
public ActionResult Edit(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey, EditViewModel viewModel) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel, projectCustomAttributeType)); } viewModel.UpdateModel(projectCustomAttributeType, CurrentPerson); return(new ModalDialogFormJsonResult()); }
public ActionResult Edit(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey, EditViewModel viewModel) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel, projectCustomAttributeType)); } viewModel.UpdateModel(projectCustomAttributeType, CurrentFirmaSession); SetWarningAboutHiddenRequiredAttributesIfNeeded(projectCustomAttributeType); return(new ModalDialogFormJsonResult()); }
public PartialViewResult Edit(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; var projectTypesSelected = projectCustomAttributeType.ProjectTypeProjectCustomAttributeTypes .Select(x => x.ProjectType).Select(x => new ProjectTypeJson(x.ProjectTypeName, x.ProjectTypeID, true)) .ToList(); var projectTypesUnselected = GetProjectTypeJsonList().Where(x => !projectTypesSelected.Select(y => y.ProjectTypeID).Contains(x.ProjectTypeID)); projectTypesSelected.AddRange(projectTypesUnselected); var projectTypeJsons = projectTypesSelected.OrderBy(x => x.ProjectTypeName).ToList(); var viewModel = new EditViewModel(projectCustomAttributeType, projectTypeJsons); return(ViewEdit(viewModel, projectCustomAttributeType)); }
public ActionResult DeleteProjectCustomAttributeType(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey, ConfirmDialogFormViewModel viewModel) { var projectCustomAttributeType = projectCustomAttributeTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteProjectCustomAttributeType(projectCustomAttributeType, viewModel)); } var message = $"{FieldDefinition.ProjectCustomAttribute.GetFieldDefinitionLabel()} '{projectCustomAttributeType.ProjectCustomAttributeTypeName}' successfully deleted!"; projectCustomAttributeType.DeleteFull(HttpRequestStorage.DatabaseEntities); SetMessageForDisplay(message); return(new ModalDialogFormJsonResult()); }
public ContentResult Description(ProjectCustomAttributeTypePrimaryKey projectCustomAttributeTypePrimaryKey) { return(Content(projectCustomAttributeTypePrimaryKey.EntityObject.ProjectCustomAttributeTypeDescription)); }