private void btnNuevo_Click(object sender, EventArgs e) { OfertasAgregar ofertasAgregar = new OfertasAgregar(); ofertasAgregar.ShowDialog(); actualizarTabla(); }
private void dataOfertas_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { DataGridViewRow renglon = dataOfertas.Rows[e.RowIndex]; string sql_where = " where idOferta=@id"; List <string> parametros = new List <string>(); List <object> valores = new List <object>(); parametros.Add("@id"); valores.Add(renglon.Cells["ID"].Value); Oferta oferta = ofertasDAO.ConsultaGeneral(sql_where, parametros, valores)[0]; OfertasAgregar ofertasAgregar = new OfertasAgregar(oferta); ofertasAgregar.ShowDialog(); actualizarTabla(); } else { Mensajes.Error("Selecciona un registro"); } }