public ActionResult Details(int Id) { if (!UserHelpar.CanDo(Helpars.Permissons.RelationRequest)) { return(RedirectToAction("Unauthorized", "Home", null)); } ViewBag.SPerson = RelationRequestViewModel.GetSourcePerson(Id); ViewBag.TPerson = RelationRequestViewModel.GetTargetPerson(Id); return(View(RelationRequestViewModel.Find(Id))); }
public ActionResult RequestRelationGVPDelete([ModelBinder(typeof(DevExpressEditorsBinder))] System.Int32 Id) { if (Id >= 0) { try { // Insert here a code to delete the RelationRequest from your model var RequestRelation = RelationRequestViewModel.Find(Id); RequestRelation.Delete(); } catch (Exception e) { ViewData["EditError"] = e.Message; } } var model = RelationRequestViewModel.GetRelationRequestList(); return(PartialView(RquestRelationView, model)); }