protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     _context = new DatabaseSQLEntities();
     _context.Configuration.LazyLoadingEnabled = true;
     _context.Configuration.ValidateOnSaveEnabled = true;
     _context.Database.BeginTransaction(IsolationLevel.Serializable);
     //navigationPane1.SelectedPageIndex = 0;
 }
示例#2
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     _context = new DatabaseSQLEntities();
     _context.Configuration.LazyLoadingEnabled    = true;
     _context.Configuration.ValidateOnSaveEnabled = true;
     _context.Database.BeginTransaction(IsolationLevel.Serializable);
     //navigationPane1.SelectedPageIndex = 0;
 }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     _context = new DatabaseSQLEntities();
     _context.Configuration.LazyLoadingEnabled = true;
     _context.Configuration.ValidateOnSaveEnabled = true;
     // Call the Load method to get the data for the given DbSet
     // from the database.
     // The data is materialized as entities. The entities are managed by
     // the DbContext instance.
     _context.Сотрудники.Load();
     _context.Звания.Load();
     _context.Подразделения.Load();
     this.сотрудникиBindingSource.DataSource =_context.Сотрудники.Local.ToBindingList();
     this.званияBindingSource.DataSource =_context.Звания.Local.ToBindingList();
     this.подразделенияBindingSource.DataSource =_context.Подразделения.Local.ToBindingList();
 }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     _context = new DatabaseSQLEntities();
     _context.Configuration.LazyLoadingEnabled    = true;
     _context.Configuration.ValidateOnSaveEnabled = true;
     // Call the Load method to get the data for the given DbSet
     // from the database.
     // The data is materialized as entities. The entities are managed by
     // the DbContext instance.
     _context.Сотрудники.Load();
     _context.Звания.Load();
     _context.Подразделения.Load();
     this.сотрудникиBindingSource.DataSource    = _context.Сотрудники.Local.ToBindingList();
     this.званияBindingSource.DataSource        = _context.Звания.Local.ToBindingList();
     this.подразделенияBindingSource.DataSource = _context.Подразделения.Local.ToBindingList();
 }
示例#5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _context = new DatabaseSQLEntities();

            // Call the Load method to get the data for the given DbSet
            // from the database.
            // The data is materialized as entities. The entities are managed by
            // the DbContext instance.
            _context.Предметы.Load();

            // Bind the categoryBindingSource.DataSource to
            // all the Unchanged, Modified and Added Category objects that
            // are currently tracked by the DbContext.
            // Note that we need to call ToBindingList() on the
            // ObservableCollection<TEntity> returned by
            // the DbSet.Local property to get the BindingList<T>
            // in order to facilitate two-way binding in WinForms.
            this.предметыBindingSource.DataSource =
                _context.Предметы.Local.ToBindingList();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _context =  new DatabaseSQLEntities();

            // Call the Load method to get the data for the given DbSet
            // from the database.
            // The data is materialized as entities. The entities are managed by
            // the DbContext instance.
            _context.Звания.Load();

            // Bind the categoryBindingSource.DataSource to
            // all the Unchanged, Modified and Added Category objects that
            // are currently tracked by the DbContext.
            // Note that we need to call ToBindingList() on the
            // ObservableCollection<TEntity> returned by
            // the DbSet.Local property to get the BindingList<T>
            // in order to facilitate two-way binding in WinForms.
            this.званияBindingSource.DataSource =
               _context.Звания.Local.ToBindingList();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _context = new DatabaseSQLEntities();

            _context.Нормативы.Load();
            _context.ФормыОбеспечения.Load();
            _context.Звания.Load();
            _context.Предметы.Load();

            this.нормативыBindingSource.DataSource =
                _context.Нормативы.Local.ToBindingList();

            this.формыОбеспеченияBindingSource.DataSource =
                _context.ФормыОбеспечения.Local.ToBindingList();

            this.званияBindingSource.DataSource =
                _context.Звания.Local.ToBindingList();

            this.предметыBindingSource.DataSource =
                _context.Предметы.Local.ToBindingList();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _context = new DatabaseSQLEntities();

            _context.Нормативы.Load();
            _context.ФормыОбеспечения.Load();
            _context.Звания.Load();
            _context.Предметы.Load();

            this.нормативыBindingSource.DataSource =
                _context.Нормативы.Local.ToBindingList();

            this.формыОбеспеченияBindingSource.DataSource =
                 _context.ФормыОбеспечения.Local.ToBindingList();

            this.званияBindingSource.DataSource =
                 _context.Звания.Local.ToBindingList();

            this.предметыBindingSource.DataSource =
                 _context.Предметы.Local.ToBindingList();
        }