private void guna2Button1_Click(object sender, EventArgs e) { using (Frm_VTipoOper tipoOper = new Frm_VTipoOper()) { tipoOper.StartPosition = FormStartPosition.CenterParent; tipoOper.btnguardar.Visible = true; tipoOper.btnmodificar.Visible = false; tipoOper.ShowDialog(); Show_TipoOper(); } }
private void btneditar_Click(object sender, EventArgs e) { if (Dgv_tipoOper.Rows.Count <= 0) { Msg.M_warning("Seleccione una Fila para poder modificar"); return; } using (Frm_VTipoOper tipoOper = new Frm_VTipoOper()) { tipoOper.StartPosition = FormStartPosition.CenterParent; tipoOper.txtidTipoOper.Text = Dgv_tipoOper.CurrentRow.Cells[0].Value.ToString(); tipoOper.txtcodOper.Text = Dgv_tipoOper.CurrentRow.Cells[1].Value.ToString(); tipoOper.txtDesc.Text = Dgv_tipoOper.CurrentRow.Cells[2].Value.ToString(); tipoOper.btnmodificar.Visible = true; tipoOper.btnguardar.Visible = false; tipoOper.txtDesc.Focus(); tipoOper.ShowDialog(); Show_TipoOper(); } }