Exemple #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            //if (dataGridView1.SelectedRows.Count > 0){
            //    //DevComponents.DotNetBar.MessageBoxEx.Show("La Fila no debe Estar Seleccionada.");
            //    //FrmRegistroProductos P = new FrmRegistroProductos();
            //    //dataGridView1.ClearSelection();
            //    //P.Show();
            //}else{
            RegistroProductos P = new RegistroProductos(this);

            //if (dataGridView1.SelectedRows.Count > 0)
            //    Program.Evento = 1;
            //else
            Program.Evento = 0;
            dataGridView1.ClearSelection();
            P.Show();
            // }
        }
Exemple #2
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         RegistroProductos P = new RegistroProductos(this);
         P.txtIdP.Text      = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         P.IdC.Text         = dataGridView1.CurrentRow.Cells[1].Value.ToString();
         P.txtProducto.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
         P.txtMarca.Text    = dataGridView1.CurrentRow.Cells[4].Value.ToString();
         P.txtPVenta.Text   = dataGridView1.CurrentRow.Cells[5].Value.ToString();
         P.txtStock.Text    = dataGridView1.CurrentRow.Cells[6].Value.ToString();
         P.Show();
         //if (dataGridView1.SelectedRows.Count > 0)
         Program.Evento = 1;
         //else
         //    Program.Evento = 0;
         dataGridView1.ClearSelection();
     }
     else
     {
         MessageBoxEx.Show("Debe Seleccionar la Fila a Editar.", "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Exemple #3
0
        public RegistrarCategoria(RegistroProductos referencia)
        {
            InitializeComponent();

            productoReferencia = referencia;
        }