public PartialViewResult DeleteSolicitation(SolicitationPrimaryKey solicitationPrimaryKey) { var solicitation = solicitationPrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(solicitation.SolicitationID); return(ViewDeleteSolicitation(solicitation, viewModel)); }
public PartialViewResult Edit(SolicitationPrimaryKey solicitationPrimaryKey) { var solicitation = solicitationPrimaryKey.EntityObject; var viewModel = new EditViewModel(solicitation); return(ViewEdit(viewModel)); }
public ActionResult Edit(SolicitationPrimaryKey solicitationPrimaryKey, EditViewModel viewModel) { if (!ModelState.IsValid) { return(ViewEdit(viewModel)); } var solicitation = solicitationPrimaryKey.EntityObject; viewModel.UpdateModel(solicitation, CurrentFirmaSession); return(new ModalDialogFormJsonResult(SitkaRoute <SolicitationController> .BuildUrlFromExpression(x => x.Index()))); }
public ActionResult DeleteSolicitation(SolicitationPrimaryKey solicitationPrimaryKey, ConfirmDialogFormViewModel viewModel) { var solicitation = solicitationPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteSolicitation(solicitation, viewModel)); } solicitation.DeleteFull(HttpRequestStorage.DatabaseEntities); return(new ModalDialogFormJsonResult()); }