public bool Save(BranchRegisterViewModel model, Guid idAccount)
        {
            var branch = ConvertBranch.FromBranchRegisterViewModel(model);
            //Recupero personas por Documento
            var person = _personDao.GetPersonByDocument(branch.PersonOwner.Document);

            branch.IdPersonOwner = person?.Id ?? Guid.Empty;

            person = _personDao.GetPersonByDocument(branch.PersonAdministration.Document);
            branch.IdPersonAdministrator = person?.Id ?? Guid.Empty;

            SaveBranch(branch, idAccount);
            return(true);
        }
Beispiel #2
0
 /// <summary>
 /// Obtener la persona por tipo de documento
 /// </summary>
 /// <param name="document"></param>
 /// <returns></returns>
 public Person GetPersonByDocument(string document)
 {
     return(_personDao.GetPersonByDocument(document));
 }