public ActionResult AboutUs()
        {
            ResultObject result_object      = new ResultObject();
            AboutUsPage  aboutUsPage_object = new AboutUsPage(result_object);

            return(View(aboutUsPage_object));
        }
Esempio n. 2
0
      public void OpenAboutUsPage()
      {
          var homePage = loginPage.LoginApplication("*****@*****.**", "automation");

          aboutUsPage = homePage.loggedInMenuItemControl.NavigateToAboutUsPage();
          Assert.IsTrue(aboutUsPage.IsVideoAvailable());
          aboutUsPage.StartVideo();
          Assert.IsTrue(aboutUsPage.IsAboutPageOpened());
      }
        public ActionResult PageAboutUsUpdated(AboutUsPage p)
        {
            var find = db.AboutUsPages.Find(1);

            find.PageContent    = HttpUtility.HtmlDecode(p.PageContent);
            TempData["success"] = "با موفقیت ویرایش شد";
            db.SaveChanges();
            return(Redirect("/ManageContentPages/PageAboutUs"));
        }
Esempio n. 4
0
        public MainPage()
        {
            Page awardCategories, nominneesPage, aboutpage = null;

            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                awardCategories = new NavigationPage(new AwardCategoriesPage())
                {
                    Title = "Award Categories List"
                };

                nominneesPage = new NavigationPage(new NomineesPage())
                {
                    Title = "Nominees List"
                };

                aboutpage = new NavigationPage(new AboutUsPage())
                {
                    Title = "About Tertiary Music Awards"
                };

                awardCategories.Icon = "";
                nominneesPage.Icon   = "";
                aboutpage.Icon       = "";
                break;

            default:
                awardCategories = new AwardCategoriesPage()
                {
                    Title = "Award Categories List"
                };

                nominneesPage = new NomineesPage()
                {
                    Title = "Nominees List"
                };

                aboutpage = new AboutUsPage()
                {
                    Title = "About Tertiary Music Awards"
                };
                break;
            }

            Children.Add(awardCategories);
            Children.Add(nominneesPage);
            Children.Add(aboutpage);

            Title = Children[0].Title;
        }
Esempio n. 5
0
 public void VerifytheVersionSequence()
 {
     try
     {
         test = extent.CreateTest("VerifytheVersionSequence").Info("Test Started");
         AboutUsPage     AbtUs       = new AboutUsPage(BaseTest.driver);
         DebtSummaryPage debt        = new DebtSummaryPage(BaseTest.driver);
         LoanDetailsPage loandetails = new LoanDetailsPage(BaseTest.driver);
         debt.ClickOnAboutUs();
         bool res = AbtUs.VersionSequence();
         Assert.IsTrue(res == true, "Sequence is Failed ");
         test.Log(Status.Pass, "Test Case Passed");
     }
     catch (Exception e)
     {
         test.Log(Status.Fail, "Test Case Failed");
         baseTest.TakeScreenshot();
         Console.WriteLine(e.StackTrace);
     }
 }
Esempio n. 6
0
        private void OnPublishingContent(object sender, ContentEventArgs contentEventArgs)
        {
            try
            {
                var contentSearchHandler = ServiceLocator.Current.GetInstance <LuceneContentSearchHandler>();

                if (contentEventArgs.Content is AboutUsPage)
                {
                    AboutUsPage page = contentEventArgs.Content as AboutUsPage;
                    if (page == null)
                    {
                        return;
                    }

                    ContentArea contentArea = page.MainContentArea;

                    if (contentArea == null)
                    {
                        return;
                    }

                    StringBuilder stringBuilder = new StringBuilder();

                    foreach (ContentAreaItem contentAreaItem in contentArea.Items)
                    {
                        IContent blockData = contentAreaItem.GetContent();

                        IEnumerable <string> props = GetSearchablePropertyValues(blockData, blockData.ContentTypeID);

                        stringBuilder.AppendFormat(" {0}", string.Join(" ", props));
                    }

                    var clone = page.CreateWritableClone() as AboutUsPage;

                    clone.SearchText = stringBuilder.ToString();
                    var contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>();
                    contentRepository.Save(clone, SaveAction.Save, AccessLevel.Read);
                }
                //include the block fragment text in the search text field
                if (contentEventArgs.Content is BlogDetailPage)
                {
                    var contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>();
                    var xhtmlString       = (contentEventArgs.Content as BlogDetailPage).Content;
                    var fragments         = xhtmlString.Fragments;
                    var searchText        = " ";
//					foreach (var fragment in fragments)
//					{
//						if (fragment is StaticFragment)
//						{
//							var staticFragment = fragment as StaticFragment;
//							searchText += staticFragment.InternalFormat + " ";
//						}
//						else if (fragment is ContentFragment)
//						{
//							var contentFragment = fragment as ContentFragment;
//							var referencedContent = contentRepository.Get<IContent>(contentFragment.ContentLink);
//							if (referencedContent is SiteBlockData)
//							{
//								var _searchText = (referencedContent as SiteBlockData).SearchText;
//								if (!string.IsNullOrWhiteSpace(_searchText))
//								{
//									searchText += _searchText + " ";
//								}
//							}
//							else
//							{
//								searchText += contentFragment.InternalFormat + " ";
//							}
//						}
//					}
                    var clone = (contentEventArgs.Content as BlogDetailPage).CreateWritableClone() as BlogDetailPage;
//					clone.SearchText = searchText;
                    clone.SearchText = xhtmlString.ToBlocksIncludedString();
                    contentRepository.Save(clone, SaveAction.Save, AccessLevel.Read);
                }
            }
            catch (Exception ex)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error(ex);
                }
            }
        }