public PartialViewResult EditTravelLineItem(GrantAllocationAwardTravelLineItemPrimaryKey grantAllocationAwardTravelLineItemPrimaryKey) { var travelLineItem = grantAllocationAwardTravelLineItemPrimaryKey.EntityObject; var viewModel = new EditGrantAllocationAwardTravelLineItemViewModel(travelLineItem); return(GrantAllocationAwardTravelLineItemViewEdit(viewModel)); }
public ActionResult EditTravelLineItem(GrantAllocationAwardTravelLineItemPrimaryKey grantAllocationAwardTravelLineItemPrimaryKey, EditGrantAllocationAwardTravelLineItemViewModel viewModel) { var travelLineItem = grantAllocationAwardTravelLineItemPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(GrantAllocationAwardTravelLineItemViewEdit(viewModel)); } viewModel.UpdateModel(travelLineItem); return(new ModalDialogFormJsonResult()); }
public ActionResult DeleteTravelLineItem(GrantAllocationAwardTravelLineItemPrimaryKey grantAllocationAwardTravelLineItemPrimaryKey, ConfirmDialogFormViewModel viewModel) { var travelLineItem = grantAllocationAwardTravelLineItemPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteTravelLineItem(travelLineItem, viewModel)); } var message = $"{FieldDefinition.GrantAllocationAwardTravelLineItem.GetFieldDefinitionLabel()} successfully deleted."; travelLineItem.DeleteFull(HttpRequestStorage.DatabaseEntities); SetMessageForDisplay(message); return(new ModalDialogFormJsonResult()); }
public PartialViewResult DeleteTravelLineItem(GrantAllocationAwardTravelLineItemPrimaryKey grantAllocationAwardTravelLineItemPrimaryKey) { var viewModel = new ConfirmDialogFormViewModel(grantAllocationAwardTravelLineItemPrimaryKey.PrimaryKeyValue); return(ViewDeleteTravelLineItem(grantAllocationAwardTravelLineItemPrimaryKey.EntityObject, viewModel)); }