public void Editar() { if (DgvGeneral.RowCount > 0 && DgvGeneral.GetFocusedRow() != null) { int idGeneral = Convert.ToInt32(DgvGeneral.GetFocusedRowCellValue("Id")); FrmGetMaterias materias = new FrmGetMaterias(); materias.Database = Database; materias.Modo = "E"; materias.Id = idGeneral; materias.ShowDialog(); if (materias.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() { FrmGetMaterias materias = new FrmGetMaterias(); materias.Database = Database; materias.Modo = "N"; materias.ShowDialog(); if (materias.DialogResult == DialogResult.OK) { if (!BkgwBuscar.IsBusy) { PrgBuscar.Visible = true; BkgwBuscar.RunWorkerAsync(); } } }