public Result UpdStudentPerson(IDictionary <string, object> dataSections) { var result = new Result(); using (var transaction = new TransactionScope()) { var person = dataSections["UpdPerson"] as Person; var updPerson = _personDAOService.UpdPerson(person); if (!updPerson.Success) { result.Message = updPerson.Message; return(result); } var student = dataSections["UpdStudent"] as Student; var updStudent = _studentDAOService.UpdStudent(student); if (!updStudent.Success) { result.Message = updStudent.Message; return(result); } transaction.Complete(); } result.Success = true; result.Message = "se ha actualizado correctacmente el estudiante."; return(result); }
public ActionResult UpdPerson(Person person) { var updPerson = _personService.UpdPerson(person); return(new JsonResult(updPerson)); }