Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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();
                }
            }
        }