Example #1
0
        private void gvBodegas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var    dataIndexNo = gvBodegas.Rows[e.RowIndex].Index.ToString();
            string cellValue   = gvBodegas.Rows[e.RowIndex].Cells[1].Value.ToString();

            id           = gvBodegas.Rows[e.RowIndex].Cells[0].Value.ToString();
            descripcion  = gvBodegas.Rows[e.RowIndex].Cells[1].Value.ToString();
            encargado    = gvBodegas.Rows[e.RowIndex].Cells[2].Value.ToString();
            stock_minimo = gvBodegas.Rows[e.RowIndex].Cells[3].Value.ToString();
            stock_maximo = gvBodegas.Rows[e.RowIndex].Cells[4].Value.ToString();
            //     MessageBox.Show(id + "_" + descripcion);


            Bodegas frm = new Bodegas();

            frm.txtID.Text          = id;
            frm.txtBodega.Text      = descripcion;
            frm.txtEncargado.Text   = encargado;
            frm.txtSMin.Text        = stock_minimo;
            frm.txtSMax.Text        = stock_maximo;
            frm.btnEditar.Enabled   = true;
            frm.btnEliminar.Enabled = true;
            frm.btnGuardar.Enabled  = false;
            frm.txtID.ReadOnly      = true;
            frm.ShowInTaskbar       = false;
            frm.StartPosition       = FormStartPosition.CenterParent;
            frm.ShowDialog(mostrarMenu.ActiveForm);
        }
Example #2
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            Bodegas prdu = new Bodegas();

            prdu.MdiParent           = this.MdiParent;
            prdu.btnEditar.Enabled   = false;
            prdu.btnEliminar.Enabled = false;
            prdu.txtID.ReadOnly      = true;
            this.Hide();

            prdu.Show();
        }