protected void btnGuardarSe_Click(object sender, EventArgs e) { DTOSensor sen = new DTOSensor(); sen.Id_sen = int.Parse(txtCodigoSe.Text); sen.Magnitud_sen1 = txtMagnitudSe.Text; sen.Caracteristica_sen1 = txtCaracteristicaSe.Text; CADSensor datos = new CADSensor(); bool existe = datos.InsertarSensor(sen); Response.Redirect("inicio.aspx#sensores"); }
protected void btnListarSe_Click(object sender, EventArgs e) { ocultarSen.Visible = false; btnVolverSen.Visible = true; DTOSensor dts = new DTOSensor(); CADSensor datos = new CADSensor(); gvSensor.DataSource = datos.ConsultarSensor(dts); gvSensor.DataBind(); }