private void btnGuardar_Click(object sender, EventArgs e) { negRadios negradios = new negRadios(); entRadio entradio = new entRadio(); //entradio.Edificio = Convert.ToInt32(cmbEdificio.SelectedValue); //entradio.Marca = Convert.ToInt32(cmbMarca.SelectedValue); //entradio.Modelo = Convert.ToInt32(cmbModelo.SelectedValue); //entradio.HostName = txtHostName.Text; //entradio.SSID = Convert.ToInt32(cmbSSID.SelectedValue); //entradio.Serie = txtSerie.Text; //entradio.Mac = txtMac.Text; //entradio.Ip = txtIp.Text; //entradio.Mascara = txtMascara.Text; //entradio.Gateway = txtGateway.Text; //entradio.Seguridad = Convert.ToInt32(cmbSeguridad.SelectedValue); //entradio.Modo = Convert.ToInt32(cmbModo.SelectedValue); if (Nuevo) { negradios.InsertarDato(entradio); } else { //entradio.idRadio = Convert.ToInt32(dgvRadios.CurrentRow.Cells["Clave"].Value.ToString()); negradios.ActualizaDato(entradio); } InhabilitarObjetos(); LimpiarObjetos(); CargarDGV(); }
private void btnEliminar_Click(object sender, EventArgs e) { negRadios negradios = new negRadios(); entRadio entradio = new entRadio(); //entradio.idRadio = Convert.ToInt32(dgvRadios.CurrentRow.Cells["Clave"].Value.ToString()); negradios.EliminaDato(entradio); }
public void Contabilizar() { negSwitches negswitches = new negSwitches(); lblSwitches.Text = negswitches.CargarDatos().Rows.Count.ToString(); negRadios negradios = new negRadios(); lblRadios.Text = negradios.CargarDatos().Rows.Count.ToString(); negAccesPoint negap = new negAccesPoint(); lblAP.Text = negap.CargarDatos().Rows.Count.ToString(); }
public void CargarDGV() { negRadios negradios = new negRadios(); //dgvRadios.DataSource = negradios.CargarDatos(); }