public void ActualizaDato(entAccesPoint accespoint) { var comando = new SqlCommand("stp_Actualiza_AP", Conexion.AbrirConexion()); comando.CommandType = CommandType.StoredProcedure; comando.Parameters.AddWithValue("@idAps", accespoint.idAccesPoint); comando.Parameters.AddWithValue("@idEdificio", accespoint.Edificio); comando.Parameters.AddWithValue("@idMarca", accespoint.Marca); comando.Parameters.AddWithValue("@idModelo", accespoint.Modelo); comando.Parameters.AddWithValue("@HostName", accespoint.HostName); comando.Parameters.AddWithValue("@idSSID", accespoint.SSID); comando.Parameters.AddWithValue("@Serie_Aps", accespoint.Serie); comando.Parameters.AddWithValue("@Mac", accespoint.Mac); comando.Parameters.AddWithValue("@Ip_Aps", accespoint.Ip); comando.Parameters.AddWithValue("@idUser", accespoint.User); comando.Parameters.AddWithValue("@Pass", accespoint.Pass); comando.Parameters.AddWithValue("@keys", accespoint.Key); comando.Parameters.AddWithValue("@idSeguridad", accespoint.Seguridad); comando.Parameters.AddWithValue("@Estado", accespoint.Estado); try { comando.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex); } Conexion.CerrarConexion(); }
private void button6_Click(object sender, EventArgs e) { negAccesPoint negaccespoint = new negAccesPoint(); entAccesPoint entaccespoint = new entAccesPoint(); //entaccespoint.idAccesPoint = Convert.ToInt32(dgvAPs.CurrentRow.Cells["Clave"].Value.ToString()); negaccespoint.EliminaDato(entaccespoint); CargarDGV(); InhabilitarObjetos(); LimpiarObjetos(); }
public void EliminaDato(entAccesPoint accespoint) { var comando = new SqlCommand("stp_Elimina_AP", Conexion.AbrirConexion()); comando.CommandType = CommandType.StoredProcedure; comando.Parameters.AddWithValue("@idAps", accespoint.idAccesPoint); try { comando.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex); } Conexion.CerrarConexion(); }
private void button5_Click(object sender, EventArgs e) { negAccesPoint negaccespoint = new negAccesPoint(); entAccesPoint entaccespoint = new entAccesPoint(); //entaccespoint.Edificio = Convert.ToInt32(cmbEdificios.SelectedValue); //entaccespoint.Marca = Convert.ToInt32(cmbEdificios.SelectedValue); //entaccespoint.Modelo = Convert.ToInt32(cmbEdificios.SelectedValue); //entaccespoint.HostName = txtHostName.Text; //entaccespoint.SSID = Convert.ToInt32(cmbEdificios.SelectedValue); //entaccespoint.Serie = txtSerie.Text; //entaccespoint.Mac = txtMac.Text; //entaccespoint.Ip = txtIp.Text; //entaccespoint.User = Convert.ToInt32(cmbEdificios.SelectedValue); //entaccespoint.Pass = txtPass.Text; //entaccespoint.Key = txtKey.Text; //entaccespoint.Seguridad = Convert.ToInt32(cmbEdificios.SelectedValue); //if (rdbA.Checked) //{ // entaccespoint.Estado = "Activo"; //} //else //{ // entaccespoint.Estado = "Inactivo"; //} //if (Nuevo) //{ // negaccespoint.InsertarDato(entaccespoint); //} //else //{ // entaccespoint.idAccesPoint = Convert.ToInt32(dgvAPs.CurrentRow.Cells["Clave"].Value.ToString()); // negaccespoint.ActualizaDato(entaccespoint); //} //CargarDGV(); //InhabilitarObjetos(); //LimpiarObjetos(); }
public void EliminaDato(entAccesPoint accespoint) { datAccesPoint dataccespoint = new datAccesPoint(); dataccespoint.EliminaDato(accespoint); }
public void ActualizaDato(entAccesPoint accespoint) { datAccesPoint dataccespoint = new datAccesPoint(); dataccespoint.ActualizaDato(accespoint); }
public void InsertarDato(entAccesPoint accespoint) { datAccesPoint dataccespoint = new datAccesPoint(); dataccespoint.InsertarDato(accespoint); }