示例#1
0
        private void Button4_Click(object sender, EventArgs e)
        {
            List <Productos> listaProductos = productoBol.MostrarTodos();

            if (dataGridView1.SelectedRows.Count < 0)
            {
                MessageBox.Show("Seleccione un registro", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                int         indice      = dataGridView1.CurrentCell.RowIndex;
                Productos   producto    = listaProductos[indice];
                FormAgregar formAgregar = new FormAgregar(producto);
                formAgregar.Show();
            }
        }
示例#2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            FormAgregar formAgregar = new FormAgregar(null);

            formAgregar.Show();
        }