public ActionResult DeleteFundingEvent(FundingEventPrimaryKey fundingEventPrimaryKey) { var fundingEvent = fundingEventPrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(fundingEventPrimaryKey.PrimaryKeyValue); return(ViewDelete(viewModel, fundingEvent)); }
public PartialViewResult EditFundingEvent(FundingEventPrimaryKey fundingEventPrimaryKey) { var fundingEvent = fundingEventPrimaryKey.EntityObject; var viewModel = new EditViewModel(fundingEvent); return(ViewEditFundingEventFundingSources(fundingEvent, viewModel)); }
public ActionResult EditFundingEvent(FundingEventPrimaryKey fundingEventPrimaryKey, EditViewModel viewModel) { var fundingEvent = fundingEventPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditFundingEventFundingSources(fundingEvent, viewModel)); } SetMessageForDisplay($"{FieldDefinitionType.FundingEvent.GetFieldDefinitionLabel()} successfully updated."); return(UpdateFundingEventFundingSources(viewModel, fundingEvent)); }
public ActionResult DeleteFundingEvent(FundingEventPrimaryKey fundingEventPrimaryKey, ConfirmDialogFormViewModel viewModel) { var fundingEvent = fundingEventPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDelete(viewModel, fundingEvent)); } fundingEvent.DeleteFull(HttpRequestStorage.DatabaseEntities); HttpRequestStorage.DatabaseEntities.SaveChanges(); SetMessageForDisplay($"{FieldDefinitionType.FundingEvent.GetFieldDefinitionLabel()} successfully deleted"); return(new ModalDialogFormJsonResult()); }