public void Editar() { if (DgvGeneral.RowCount > 0 && DgvGeneral.GetFocusedRow() != null) { int idGeneral = Convert.ToInt32(DgvGeneral.GetFocusedRowCellValue("Id")); FrmGetProfesores profesores = new FrmGetProfesores(); profesores.Database = Database; profesores.Modo = "E"; profesores.Id = idGeneral; profesores.ShowDialog(); if (profesores.DialogResult == DialogResult.OK) { if (!BkgwBuscar.IsBusy) { PrgBuscar.Visible = true; BkgwBuscar.RunWorkerAsync(); } } } else { XtraMessageBox.Show("Debe seleccionar un registro.", Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void Añadir() { FrmGetProfesores profesores = new FrmGetProfesores(); profesores.Database = Database; profesores.Modo = "N"; profesores.ShowDialog(); if (profesores.DialogResult == DialogResult.OK) { if (!BkgwBuscar.IsBusy) { PrgBuscar.Visible = true; BkgwBuscar.RunWorkerAsync(); } } }