Esempio n. 1
0
 public async Task UpdateRelation(UpdateRelationDTO input)
 {
     try
     {
         await _relationService.UpdateRelation(input);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
        public ActionResult UpdateRelation(Relation relation)
        {
            ViewBag.Person = personService.GetPerson(relation.SourceId).ToString();

            ViewBag.RelationNames = relationNameService.GetRelationNames().Select(x => x.Name).ToArray();

            if (relation.Id == 0)
            {
                relationService.AddRelation(relation);
            }

            else
            {
                relationService.UpdateRelation(relation);
            }

            ViewBag.Message = "Изменения родства были сохранены";

            relation.TargetPerson = personService.GetPerson(relation.TargetId);

            return(PartialView("Modal/_RelationPartial", relation));
        }
 public void UpdateRelation(UpdateRelationDTO input)
 {
     _relationService.UpdateRelation(input);
 }
Esempio n. 4
0
        public async Task <IActionResult> EditRelation(UpdateRelationModel modelToUpdate)
        {
            await _service.UpdateRelation(modelToUpdate);

            return(Ok());
        }