public bool Update(Personas entity) { try { var data = new InmDAL.Personas() { Apellido = entity.Apellido, Celular = entity.Celular, DU = entity.DU, Email = entity.Email, Nombre = entity.Nombre, PersonasId = entity.PersonasId.Value, Telefono = entity.Telefono, TelefonoLaboral = entity.TelefonoLaboral }; var response = genericDal.Update(data); if (response != null) { return(true); } return(false); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int Add(Personas entity) { try { int response = 0; if (!ExisteClienteConDNI(entity.DU)) { var data = new InmDAL.Personas { Apellido = entity.Apellido, Nombre = entity.Nombre, Email = entity.Email, DU = entity.DU, Telefono = entity.Telefono, TelefonoLaboral = entity.TelefonoLaboral, Celular = entity.Celular }; response = genericDal.Add(data); } return(response); } catch (Exception ex) { throw new Exception(ex.Message); } }
public bool Delete(Personas entity) { try { var data = new InmDAL.Personas(); data.PersonasId = entity.PersonasId.Value; var response = genericDal.Delete(data); if (response != null) { return(true); } return(false); } catch (Exception ex) { throw new Exception(ex.Message); } }