示例#1
0
 private void SetView(object item)
 {
     if (!(item is BachupGroup))
     {
         if (item is BachupItem)
         {
             BachupItem bi = (BachupItem)item;
             Settings.LastOpened = bi.ID;
             SelectedViewModel   = new BachupItemView()
             {
                 DataContext = new BachupItemViewModel(bi)
             };
             return;
         }
         SelectedViewModel = new HomePageView();
     }
     else
     {
         BachupGroup bg = (BachupGroup)item;
         Settings.LastOpened = bg.ID;
         SelectedViewModel   = new BachupGroupView()
         {
             DataContext = new BachupGroupViewModel(bg)
         };
         return;
     }
 }
示例#2
0
        public HomePageView Index()
        {
            System.Web.Mvc.ViewResult viewResult = (System.Web.Mvc.ViewResult) this.homeController.Index();

            HomePageView homePageView = (HomePageView)viewResult.ViewData.Model;

            return(homePageView);
        }
        // GET: Home
        public ActionResult Index()
        {
            HomePageView homePageView = new HomePageView();

            homePageView.Products = _productCatalogService.GetFeaturedProducts().Products;

            ViewBag.Categories = GetCategories();

            return(View(homePageView));
        }
        public ActionResult Index()
        {
            HomePageView homePageView = new HomePageView();

            homePageView.Categories = base.GetCategories();
            GetFeaturedProductsResponse response =
                _productCatalogService.GetFeaturedProducts();

            homePageView.Products = response.Products;
            return(View(homePageView));
        }
示例#5
0
        /*
         * Creates Home Page View and injects all required dependencies.
         */
        public Page CreateHomePage()
        {
            var homePageViewModel = new HomePageViewModel();
            var homePagePresenter = new HomePagePresenter(homePageViewModel, _mainService, _synchronizationContext);

            var homePageView = new HomePageView();

            homePageView.DataContext = homePageViewModel;

            return(homePageView);
        }
示例#6
0
        public IActionResult Index()
        {
            HomePageView homePageView = new HomePageView();

            homePageView.Categories    = GetCategories();
            homePageView.BasketSummary = GetBasketSummaryView();
            GetFeaturedProductsResponse response = _cachedProductCatalogService.GetFeaturedProducts();

            homePageView.Products = response.Products;

            return(View(homePageView));
        }
示例#7
0
        public ActionResult Index(int Id = 0)
        {
            HomePageView homePageView = new HomePageView();

            homePageView.Categories = base.GetAllCategoriesHavingAccess(Id);
            GetFeaturedProductResponse response = new GetFeaturedProductResponse();

            response = _productCatalogService.GetFeaturedProducts(new GetFeaturedProductRequest {
                RetailerId = Id
            });
            homePageView.Products = response.Products;
            return(View("Index", homePageView));
        }
示例#8
0
        public ActionResult <HomePageView> Index()
        {
            var homePageView = new HomePageView();

            homePageView.Categories    = base.GetCategories();
            homePageView.BasketSummary = base.GetBasketSummaryView();

            GetFeaturedProductsResponse response =
                _productCatalogService.GetFeaturedProducts();

            homePageView.Products = response.Products;

            return(homePageView);
        }
        public void Menu_Our_BusinessesTest02()
        {
            TestContext.WriteLine("Start the test for link Our_Businesses");
            HomePageView homePage = new HomePageView(remoeteDriver.get_driver());

            homePage.click_Link_Our_Businesses();
            Assert.IsTrue(homePage.i_see_Link_About(), "I dont see About link from menu");
            Assert.IsTrue(homePage.i_see_Link_Careers(), "I dont see Careers link from menu");
            Assert.IsTrue(homePage.i_see_Link_News_Event(), "I dont see News Event link from menu");
            Assert.IsTrue(homePage.i_see_Link_Our_Businesses(), "I dont see Our_Businesses link from menu");
            Assert.IsTrue(homePage.i_see_Link_search(), "I dont see Search link from menu");
            Assert.IsTrue(homePage.i_see_link_login(), "I dont see LogIn link from menu");
            Assert.IsTrue(homePage.i_see_link_Sing_Up(), "I dont see LogIn link from menu");
            TestContext.WriteLine("End test");
        }
示例#10
0
        public void Login_from_home_pageTest04()
        {
            TestContext.WriteLine("Start the test for link login user");
            HomePageView homePage = new HomePageView(remoeteDriver.get_driver());

            Assert.IsTrue(homePage.i_see_link_login());
            Assert.IsTrue(homePage.i_see_link_Sing_Up());
            Assert.IsTrue(homePage.click_link_login());
            Login loginmodal = new Login(remoeteDriver.get_driver());

            Assert.IsTrue(loginmodal.set_user_name("*****@*****.**"));
            Assert.IsTrue(loginmodal.set_pass("test_11"));
            Assert.IsTrue(loginmodal.click_button_login());
            Assert.IsTrue(loginmodal.close_windows());
            TestContext.WriteLine("End test");
        }
示例#11
0
        public void HomePageTest01()
        {
            TestContext.WriteLine("Start the test for home page");
            HomePageView homePage = new HomePageView(remoeteDriver.get_driver());

            Assert.IsTrue(homePage.i_see_home_page(), "I dont see home page content");
            Assert.IsTrue(homePage.i_see_Link_About(), "I dont see About link from menu");
            Assert.IsTrue(homePage.i_see_Link_Careers(), "I dont see Careers link from menu");
            Assert.IsTrue(homePage.i_see_Link_News_Event(), "I dont see News Event link from menu");
            Assert.IsTrue(homePage.i_see_Link_Our_Businesses(), "I dont see Our_Businesses link from menu");
            Assert.IsTrue(homePage.i_see_Link_search(), "I dont see Search link from menu");
            Assert.IsTrue(homePage.i_see_link_login(), "I dont see LogIn link from menu");
            Assert.IsTrue(homePage.i_see_link_Sing_Up(), "I dont see LogIn link from menu");
            Assert.IsTrue(homePage.close_cookie());
            TestContext.WriteLine("End the test");
        }
示例#12
0
        public void verifyNewCuntumer()
        {
            HomePageView homePage = new HomePageView();

            homePage.LoginAccount("mngr318643", "pArehEt");

            NewcustomerView newcustomer = new NewcustomerView();

            newcustomer.clickNewCustomer();
            var allData = ExcelHelper.GetTestData <RegisterTestDataObject>("New Microsoft Excel Worksheet", "sheet1");

            newcustomer.RegisterAccount(allData);

            // newcustomer.SubmitAccount();
            newcustomer.Clicklogout();
        }
示例#13
0
        public void Sing_Up_from_home_pageTest04()
        {
            TestContext.WriteLine("Start the test for Sing_Up user");
            HomePageView homePage = new HomePageView(remoeteDriver.get_driver());

            Assert.IsTrue(homePage.i_see_link_Sing_Up());
            Assert.IsTrue(homePage.click_link_Sing_Up());
            RegisterPageView register = new RegisterPageView(remoeteDriver.get_driver());

            Assert.IsTrue(register.close_cookie());
            Assert.IsTrue(register.set_first_name("Seastian"));
            Assert.IsTrue(register.set_last_name("Bednarz"));
            Assert.IsTrue(register.set_jobtitle("Tester"));
            Assert.IsTrue(register.set_name_company("S3Group"));
            Assert.IsTrue(register.click_link_Register());
            Assert.IsTrue(register.check_error_from_register(), "I dont see error message for validations");
            TestContext.WriteLine("End test");
        }
示例#14
0
        bool needAni = false;// set back to false after animation done!!
        public ObjectMarker(HomePageView window, GMapMarker marker, Target target)
        {
            this.InitializeComponent();

            this.MainWindow   = window;
            this.Marker       = marker;
            RenderTransform   = scale;
            this.Loaded      += new RoutedEventHandler(ObjectMarker_Loaded);
            this.SizeChanged += new SizeChangedEventHandler(ObjectMarker_SizeChanged);
            this.MouseEnter  += new MouseEventHandler(ObjectMarker_MouseEnter);
            this.MouseLeave  += new MouseEventHandler(ObjectMarker_MouseLeave);

            this.MouseLeftButtonUp   += new MouseButtonEventHandler(ObjectMarker_MouseLeftButtonUp);
            this.MouseLeftButtonDown += new MouseButtonEventHandler(ObjectMarker_MouseLeftButtonDown);

            _popup  = false;
            _target = target;
        }
示例#15
0
        bool needAni = false;// set back to false after animation done!!
        public BuoyMarker(HomePageView window, GMapMarker marker, Buoy buoy)
        {
            this.InitializeComponent();

            this.MainWindow = window;
            this.Marker     = marker;

            RenderTransform   = scale;
            this.Loaded      += new RoutedEventHandler(BuoyMarker_Loaded);
            this.SizeChanged += new SizeChangedEventHandler(BuoyMarker_SizeChanged);
            this.MouseEnter  += new MouseEventHandler(MarkerControl_MouseEnter);
            this.MouseLeave  += new MouseEventHandler(MarkerControl_MouseLeave);
            //this.MouseMove += new MouseEventHandler(BuoyMarker_MouseMove);
            this.MouseLeftButtonUp   += new MouseButtonEventHandler(BuoyMarker_MouseLeftButtonUp);
            this.MouseLeftButtonDown += new MouseButtonEventHandler(BuoyMarker_MouseLeftButtonDown);

            _popup = false;
            _buoy  = buoy;
            Text   = " ";
        }
示例#16
0
        public ActionResult Index()
        {
            var cat = db.Categories.OrderBy(c => c.CategoryID);
            //var additionOfw = db.Words.Where(w => w.CategoryID == "AdditionOfw").Take(10);
            //var sameSoundasInEnglish = db.Words.Where(w => w.CategoryID == "SameSoundasInEnglish").Take(10);
            //var twoConsonantCombinations = db.Words.Where(w => w.CategoryID == "TwoConsonantCombinations").Take(10);
            //var verbs = db.Words.Where(w => w.CategoryID == "Verbs").Take(10);

            HomePageView viewModel = new HomePageView
            {
                Categories      = cat.ToList(),
                SyllableSounds1 = db.SyllableSounds.Where(s => s.SType == 1).OrderBy(s => s.SyllableSoundsId).ToList(),
                SyllableSounds2 = db.SyllableSounds.Where(s => s.SType == 2).OrderBy(s => s.SyllableSoundsId).ToList()
            };

            if (viewModel != null)
            {
                return(View(viewModel));
            }
            else
            {
                return(View());
            }
        }
示例#17
0
        public void VerifyLogIn()
        {
            HomePageView pageView = new HomePageView();

            pageView.LoginAccount("mngr318486", "UrYgYpA");
        }
 protected override void OnViewAttached(object view, object context)
 {
     base.OnViewAttached(view, context);
     homeView = view as HomePageView;
 }