private PartialViewResult ViewDeleteSuppliesLineItem(GrantAllocationAwardSuppliesLineItem grantAllocationSuppliesLineItem, ConfirmDialogFormViewModel viewModel) { var confirmMessage = $"Are you sure you want to delete this {FieldDefinition.GrantAllocationAwardSuppliesLineItem.GetFieldDefinitionLabel()} '{grantAllocationSuppliesLineItem.GrantAllocationAwardSuppliesLineItemDescription}'?"; var viewData = new ConfirmDialogFormViewData(confirmMessage, true); return(RazorPartialView <ConfirmDialogForm, ConfirmDialogFormViewData, ConfirmDialogFormViewModel>(viewData, viewModel)); }
public ActionResult NewSuppliesLineItemFromGrantAllocationAward(GrantAllocationAwardPrimaryKey grantAllocationAwardPrimaryKey, EditGrantAllocationAwardSuppliesLineItemViewModel viewModel) { if (!ModelState.IsValid) { return(GrantAllocationAwardSuppliesLineItemViewEdit(viewModel)); } var grantAllocationAward = HttpRequestStorage.DatabaseEntities.GrantAllocationAwards.Single(ga => ga.GrantAllocationAwardID == viewModel.GrantAllocationAwardID); var grantAllocationAwardSuppliesLineItem = GrantAllocationAwardSuppliesLineItem.CreateNewBlank(grantAllocationAward); viewModel.UpdateModel(grantAllocationAwardSuppliesLineItem); return(new ModalDialogFormJsonResult()); }