Beispiel #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            TipoOrdenCompra prdu = new TipoOrdenCompra();

            prdu.MdiParent           = this.MdiParent;
            prdu.btnEditar.Enabled   = false;
            prdu.btnEliminar.Enabled = false;
            prdu.txtCodigo.ReadOnly  = true;
            this.Hide();
            //prdu.btnEditar.Enabled = false;
            //prdu.btnEliminar.Enabled = false;
            prdu.Show();
        }
Beispiel #2
0
        private void grdInventario_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var    dataIndexNo = grdInventario.Rows[e.RowIndex].Index.ToString();
            string cellValue   = grdInventario.Rows[e.RowIndex].Cells[1].Value.ToString();

            string idProveedor = grdInventario.Rows[e.RowIndex].Cells[0].Value.ToString();
            string nombre      = grdInventario.Rows[e.RowIndex].Cells[1].Value.ToString();

            TipoOrdenCompra frm = new TipoOrdenCompra();

            frm.txtCodigo.Text = idProveedor;
            frm.txtNombre.Text = nombre;


            frm.btnEditar.Enabled   = true;
            frm.btnEliminar.Enabled = true;
            frm.btnGuardar.Enabled  = false;
            frm.txtCodigo.ReadOnly  = true;
            frm.ShowInTaskbar       = false;
            frm.StartPosition       = FormStartPosition.CenterParent;
            frm.ShowDialog(mostrarMenu.ActiveForm);
        }