Exemplo n.º 1
0
 private void txtbLugar_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         TelefonoDatos tec = new TelefonoDatos(txtbtel.Text, txtbLugar.Text);
         dgvTelefonia.Rows.Add(tec.telefono, tec.lugar);
     }
 }
Exemplo n.º 2
0
 private void txtLugar_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         //Hola hola hola
         TelefonoDatos telefonoDatos = new TelefonoDatos(txtTelefono.Text, txtLugar.Text);
         dgvTelefonia.Rows.Add(telefonoDatos.telefono, telefonoDatos.lugar);
     }
 }
Exemplo n.º 3
0
        public void Guardar(Telefono tel)
        {
            if (tel.NumeroTelefono == 0)
            {
                throw new ApplicationException("Debe digitar un numero de telefono");
            }

            TelefonoDatos datos = new TelefonoDatos();

            if (datos.SeleccionarPorNumero(Int32.Parse(tel.NumeroTelefono.ToString())) == null)
            {
                datos.Insertar(tel);
            }
            else
            {
                datos.Actualizar(tel);
            }
        }
Exemplo n.º 4
0
 private void txtbLugar_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         if (txtbTelefono.Text != "" && txtbLugar.Text != "" && !llamada_en_curso)
         {
             TelefonoDatos telefonoDatos = new TelefonoDatos(txtbTelefono.Text, txtbLugar.Text);
             //Se inserta un elemento al DataGridView
             dgvTelefonia.Rows.Add(telefonoDatos.telefono, telefonoDatos.lugar, ts);
             tiempollamadaEvento.Start();
             txtbLugar.Clear();
             txtbTelefono.Clear();
             llamada_en_curso = true;
         }
         else
         {
             MessageBox.Show("No se han ingresado datos");
         }
     }
 }
Exemplo n.º 5
0
        public List <Telefono> SeleccionarTodos()
        {
            TelefonoDatos datos = new TelefonoDatos();

            return(datos.SeleccionarTodos());
        }