public CustomerController()
 {
     context = new LittleTravellerDataContext();
     Console.SetOut(new DebugTextWriter());
     context.Log = Console.Out;
     ViewData["states"] = new SelectList(context.states, "Name", "Name");
 }
 public ItemController()
 {
     context = new LittleTravellerDataContext();
     Console.SetOut(new DebugTextWriter());
     context.Log = Console.Out;
     ViewData["Colors"] = new SelectList(context.Colors, "ColorCode", "ColorCode");
     ViewData["Seasons"] = new SelectList(context.Seasons, "SeasonCode", "SeasonCode");
     ViewData["SizeTypes"] = new SelectList(context.SizeTypes, "SizeTypeName", "SizeTypeName");
     ViewData["Sizes"] = new SelectList(context.Sizes.Select(s => s.SizeVal));
     ViewData["StyleTypes"] = new SelectList(context.StyleTypes, "ID", "Desc");
     ViewData["Designs"] = new SelectList(context.Designs, "ID", "Desc");
 }
Esempio n. 3
0
        public MainWindow()
        {
            _mainViewModel = new MainWindowViewModel();

            //this.DataContext = _mainViewModel;

            InitializeComponent();

            _ltData = new LittleTravellerDataContext();
            //List<Season> seasonList = _ltData.GetSeasons();

            //_mainViewModel.Seasons = _ltData.GetSeasons();

            this.DataContext = _mainViewModel;
        }