Ejemplo n.º 1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            Lineas Linea = new Lineas();

            Linea.MdiParent           = this.MdiParent;
            Linea.btnEditar.Enabled   = false;
            Linea.btnEliminar.Enabled = false;
            Linea.txtCod.ReadOnly     = true;
            this.Hide();

            Linea.Show();
        }
Ejemplo n.º 2
0
        private void gvLineas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var    dataIndexNo = gvLineas.Rows[e.RowIndex].Index.ToString();
            string cellValue   = gvLineas.Rows[e.RowIndex].Cells[1].Value.ToString();

            id          = gvLineas.Rows[e.RowIndex].Cells[0].Value.ToString();
            descripcion = gvLineas.Rows[e.RowIndex].Cells[1].Value.ToString();

            Lineas frm = new Lineas();

            frm.txtCod.Text         = id;
            frm.txtDescripcion.Text = descripcion;
            frm.btnEditar.Enabled   = true;
            frm.btnEliminar.Enabled = true;
            frm.btnGuardar.Enabled  = false;
            frm.txtCod.ReadOnly     = true;
            frm.ShowInTaskbar       = false;
            frm.StartPosition       = FormStartPosition.CenterParent;
            frm.ShowDialog(mostrarMenu.ActiveForm);
        }