예제 #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);
            }
        }
예제 #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();
                }
            }
        }