public ActionResult EditSuppliesLineItem(GrantAllocationAwardSuppliesLineItemPrimaryKey grantAllocationAwardSuppliesLineItemPrimaryKey, EditGrantAllocationAwardSuppliesLineItemViewModel viewModel) { var grantAllocationAwardSuppliesLineItem = grantAllocationAwardSuppliesLineItemPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(GrantAllocationAwardSuppliesLineItemViewEdit(viewModel)); } viewModel.UpdateModel(grantAllocationAwardSuppliesLineItem); return(new ModalDialogFormJsonResult()); }
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()); }