Ejemplo n.º 1
0
 public bool deleteTelefono()
 {
     //valido que el telefono no sea NULL o numeros vacios
     if (this.Telefonoid != -1 && this.numeroCasa != null && this.numeroCelular != null &&
         (this.numeroCasa != "" || this.numeroCelular != ""))
     {
         TelefonoDTO teldto = new TelefonoDTO();
         teldto = teldto.GetTelefono(this.Telefonoid);
         return(teldto.DeshabilitarTelefono(false));
     }
     return(false);
 }
Ejemplo n.º 2
0
        //Devuelve telefono por id caso de no encontrarlo devuelve id en -1 y numeros en null
        public void GetTelefonobyID(int telefonoid)
        {
            TelefonoDTO teldto = new TelefonoDTO();

            teldto = teldto.GetTelefono(telefonoid);
            if (teldto != null)
            {
                this.Telefonoid    = teldto.Telefonoid;
                this.numeroCasa    = teldto.numeroCasa;
                this.numeroCelular = teldto.numeroCelular;
            }
            else
            {
                this.Telefonoid    = -1;
                this.numeroCasa    = null;
                this.numeroCelular = null;
            }
        }