public TbCrContactoRelacion viewToModelContactoRelacion(ContactoRelacionViewModel domain)
        {
            TbCrContactoRelacion contactoRelacion = new TbCrContactoRelacion();

            contactoRelacion.IdContactoPadre = domain.IdContactoPadre;
            contactoRelacion.IdContactoHijo  = domain.IdContactoHijo;
            contactoRelacion.NotaRelacion    = domain.NotaRelacion;

            return(contactoRelacion);
        }
Example #2
0
 public ContactoRelacionViewModel  DomainToViewModelCR(TbCrContactoRelacion domain)
 {
     return(new ContactoRelacionViewModel
     {
         Id = domain.Id,
         IdContactoPadre = domain.IdContactoPadre,
         IdContactoHijo = domain.IdContactoHijo,
         NotaRelacion = domain.NotaRelacion ?? ""
     });
 }
Example #3
0
 public JsonResult GuardarRelacion(ContactoRelacionViewModel domain)
 {
     try
     {
         TbCrContactoRelacion cr = new TbCrContactoRelacion();
         cr = this.contactoMap.InsertarRelacion(domain);
     }
     catch
     {
         throw;
     }
     return(new JsonResult(1));
 }
 public TbCrContactoRelacion UpdateRelacion(TbCrContactoRelacion domain)
 {
     return(this.crRepository.Update(domain));
 }
 public TbCrContactoRelacion InsertarRelacion(TbCrContactoRelacion domain)
 {
     return(this.crRepository.Save(domain));
 }