public MainWindow() { InitializeComponent(); _productProvider = new ProductProvider(); //_productProvider.GetAllProducts(); Photos = (BLL.Model.PhotoCollection)(this.Resources["Photos"] as ObjectDataProvider).Data; }
public AddRoom() { InitializeComponent(); adressProvider = new AdressProvider(); roomProvider = new RoomProvider(); Photos = (BLL.Model.PhotoCollection)(this.Resources["Photos"] as ObjectDataProvider).Data; }
public WindowAdd() { InitializeComponent(); _productProvider = new ProductProvider(); //var z = (PhotoCollection)(this.Resources["Photos"] as ObjectDataProvider).Data; Photos = (BLL.Model.PhotoCollection)(this.Resources["Photos"] as ObjectDataProvider).Data; //is.Photos. = //Environment.CurrentDirectory + "\\Images"; using (EfContext context = new EfContext()) { //cat = context.Categories.ToList(); //treeView1.ItemsSource = (from c in context.Categories // select new { c.Id, c.Name}).ToList(); //foreach (var item in context.Categories) //{ // ComboCategory.Items.Add(item.Name); //} ComboCategory.ItemsSource = (from c in context.Categories select c).ToList(); } }