Пример #1
0
        public MainWindow()
        {
            InitializeComponent();
            context = new ResourseContext();
            db      = new RepositoryResourseEF(context);


            db.db.Resourses.Load();

            getRes = new GetResourse();
            // context.Resourses.Load();

            //  ResourseGrid.ItemsSource = context.Resourses.Local.ToBindingList();
            ResourseGrid.ItemsSource = getRes.ReturnResourse().ToList();



            this.Closing += MainWindow_Closing;
        }
Пример #2
0
        public Resourses()
        {
            InitializeComponent();
            context = new Context();
            // db = new RepositoryResourseEF(context);
            db = new RepositoryResourseEF();

            db.db.Resourses.Load();

            getRes = new GetResourse();


            //  ResourseGrid.ItemsSource = context.Resourses.Local.ToBindingList();

            // ResourseGrid.ItemsSource = db.db.Resourses.Local.ToBindingList();
            UPDATE();



            this.Closing += MainWindow_Closing;
        }
Пример #3
0
 public GetResourse()
 {
     resourse = new RepositoryResourseEF();
 }
Пример #4
0
 public AddResourse()
 {
     resourse = new RepositoryResourseEF();
 }