public ViewResult Edit(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey) { var customAttributeType = customAttributeTypePrimaryKey.EntityObject; var viewModel = new EditViewModel(customAttributeType); return(ViewEdit(viewModel, customAttributeType)); }
public PartialViewResult DeleteCustomAttributeType(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey) { var customAttributeType = customAttributeTypePrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(customAttributeType.CustomAttributeTypeID); return(ViewDeleteCustomAttributeType(customAttributeType, viewModel)); }
public ViewResult Detail(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey) { var customAttributeType = customAttributeTypePrimaryKey.EntityObject; var viewData = new DetailViewData(CurrentPerson, customAttributeType); return(RazorView <Detail, DetailViewData>(viewData)); }
public ActionResult Edit(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey, EditViewModel viewModel) { var customAttributeType = customAttributeTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel, customAttributeType)); } viewModel.UpdateModel(customAttributeType, CurrentPerson); return(RedirectToAction(new SitkaRoute <CustomAttributeTypeController>(c => c.Detail(customAttributeType.PrimaryKey)))); }
public ActionResult DeleteCustomAttributeType(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey, ConfirmDialogFormViewModel viewModel) { var customAttributeType = customAttributeTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteCustomAttributeType(customAttributeType, viewModel)); } var message = $"{FieldDefinitionType.CustomAttributeType.GetFieldDefinitionLabel()} '{customAttributeType.CustomAttributeTypeName}' successfully deleted!"; customAttributeType.DeleteFull(HttpRequestStorage.DatabaseEntities); SetMessageForDisplay(message); return(new ModalDialogFormJsonResult()); }
public GridJsonNetJObjectResult <TreatmentBMPType> TreatmentBMPTypeGridJsonData(CustomAttributeTypePrimaryKey customAttributeTypePrimaryKey) { var gridSpec = new TreatmentBMPTypeGridSpec(CurrentPerson); var customAttributeType = customAttributeTypePrimaryKey.EntityObject; var treatmentBMPTypes = customAttributeType.TreatmentBMPTypeCustomAttributeTypes.Select(x => x.TreatmentBMPType).OrderBy(x => x.TreatmentBMPTypeName).ToList(); var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <TreatmentBMPType>(treatmentBMPTypes, gridSpec); return(gridJsonNetJObjectResult); }