public PartialViewResult EditPersonnelAndBenefitsLineItem(GrantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey grantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey) { var personnelAndBenefitsLineItem = grantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey.EntityObject; var viewModel = new EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel(personnelAndBenefitsLineItem); return(GrantAllocationAwardPersonnelAndBenefitsLineItemViewEdit(viewModel)); }
public PartialViewResult NewPersonnelAndBenefitsLineItemFromGrantAllocationAward(GrantAllocationAwardPrimaryKey grantAllocationAwardPrimaryKey) { var grantAllocationAward = grantAllocationAwardPrimaryKey.EntityObject; var viewModel = new EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel() { GrantAllocationAwardID = grantAllocationAward.GrantAllocationAwardID }; return(GrantAllocationAwardPersonnelAndBenefitsLineItemViewEdit(viewModel)); }
public ActionResult EditPersonnelAndBenefitsLineItem(GrantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey grantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey, EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel viewModel) { var personnelAndBenefitsLineItem = grantAllocationAwardPersonnelAndBenefitsLineItemPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(GrantAllocationAwardPersonnelAndBenefitsLineItemViewEdit(viewModel)); } viewModel.UpdateModel(personnelAndBenefitsLineItem); return(new ModalDialogFormJsonResult()); }
private PartialViewResult GrantAllocationAwardPersonnelAndBenefitsLineItemViewEdit(EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel viewModel) { var peopleList = HttpRequestStorage.DatabaseEntities.People.ToList().OrderBy(x => x.FullNameLastFirst); var viewData = new EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewData(peopleList); return(RazorPartialView <EditGrantAllocationAwardPersonnelAndBenefitsLineItem, EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewData, EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel>(viewData, viewModel)); }
public ActionResult NewPersonnelAndBenefitsLineItemFromGrantAllocationAward(GrantAllocationAwardPrimaryKey grantAllocationAwardPrimaryKey, EditGrantAllocationAwardPersonnelAndBenefitsLineItemViewModel viewModel) { if (!ModelState.IsValid) { return(GrantAllocationAwardPersonnelAndBenefitsLineItemViewEdit(viewModel)); } var grantAllocationAward = HttpRequestStorage.DatabaseEntities.GrantAllocationAwards.Single(ga => ga.GrantAllocationAwardID == viewModel.GrantAllocationAwardID); var personnelAndBenefitsLineItem = GrantAllocationAwardPersonnelAndBenefitsLineItem.CreateNewBlank(grantAllocationAward); viewModel.UpdateModel(personnelAndBenefitsLineItem); return(new ModalDialogFormJsonResult()); }