Exemplo n.º 1
0
        private void ConsultaProducto_Load(object sender, EventArgs e)
        {
            operacion oper = new operacion();
            DataTable dt   = new DataTable();

            dt = oper.ExtraeData("SELECT * FROM producto;");
            dataGridView1.DataSource = dt;
            dataGridView1.Refresh();
            dataGridView1.Columns[0].ReadOnly = true;

            if (mantenimiento)
            {
                Form f = new producto();
                this.Hide();
                f.ShowDialog();
                if (!mantenimiento2)
                {
                    this.Close();
                }
                else
                {
                }
                mantenimiento  = false;
                mantenimiento2 = false;
            }
            else
            {
            }
        }
Exemplo n.º 2
0
        public void RealizarModificacion()
        {
            producto.modificar = true;

            foreach (DataGridViewRow fila in dataGridView1.SelectedRows)
            {
                try
                {
                    producto.idmodificar = fila.Cells[0].Value.ToString();
                }
                catch (Exception)
                {
                }
            }
            Form f = new producto();

            f.ShowDialog();
            RealizarBusqueda();
        }