public async Task <ActionResult> Index(int?Page, string Tag, string Category) { // ViewBag.Title = "وبلاگ"; string TitlePage = "آخرين مطالب"; if (!(Tag == "" || Tag == null)) { TitlePage = "مطالب وبلاگ مشابه به : " + Tag; } else if (!(Category == "" || Category == null)) { TitlePage = "مطالب وبلاگ در دسته بندی : " + Category; } ViewBag.TitlePage = TitlePage; ViewBag.SeoData = HtmlPageSEO.GetHeadPageData(TitlePage, new robot[] { robot.noindex, robot.nofollow }, new HtmlMetaTag[] { new HtmlMetaTag() { name = MetaName.author, content = "محمد بن سعيد" }, new HtmlMetaTag() { name = MetaName.description, content = "مطالب پست شده در قالب وبلاگ وبسايت شخصی محمد بن سعيد - فناوری اطلاعات" } }, null); PagingStatus.PageIndex = (Page ?? 1) - 1; var ListAllPost = await GetPost(PagingStatus.PageIndex, PagingStatus.ItemsPerPage /*, out int totalCount*/, Tag, Category); var result = new StaticPagedList <vm_AllPost>(ListAllPost, PagingStatus.PageIndex + 1, PagingStatus.ItemsPerPage, ListAllPost.Count()); return(View(result)); }
public ActionResult Contact_US() { ViewBag.SeoData = HtmlPageSEO.GetHeadPageData("ارتباط با مديريت وبسايت", new robot[] { robot.noindex, robot.nofollow }, new HtmlMetaTag[] { new HtmlMetaTag() { name = MetaName.author, content = "محمد بن سعيد" } }, null); return(View()); }
public ActionResult ContentDetail(int PostID) { try { ViewBag.BeforeLiked = _dop.CheckLastActionPost(PostID, Convert.ToInt32(EnumMethod.ActionType.Like)); } catch (Exception) { ViewBag.BeforeLiked = false; } ViewAndLikeLog(PostID, Convert.ToInt32(EnumMethod.ActionType.View)); var Result = new List <vm_AllPost>(); Result = _dop.GetAllPost("all").Where(x => x.PostID == PostID && x.IsActive == "1").ToList(); using (var _Context = new ApplicationDbContext()) { var _objEntityPostComment = new RepositoryPattern <PostComment>(_Context); var _PostComment = _objEntityPostComment.SearchFor(x => x.PostID == PostID && x.Is_Active == "1").ToList(); ViewBag.listPostComment = _PostComment; } ViewBag.SeoData = HtmlPageSEO.GetHeadPageData(Result.FirstOrDefault().Title, new robot[] { robot.index, robot.follow }, new HtmlMetaTag[] { new HtmlMetaTag() { name = MetaName.author, content = "محمد بن سعيد" }, new HtmlMetaTag() { name = MetaName.keywords, content = Result.FirstOrDefault().Labels }, new HtmlMetaTag() { name = MetaName.description, content = Result.FirstOrDefault().SeoMetaDescription } }, null); return(View(Result)); }
public ActionResult Index() { //throw new System.Exception("hhhh"); ViewBag.SeoData = HtmlPageSEO.GetHeadPageData("وبسايت شخصی محمد بن سعيد", new robot[] { robot.index, robot.follow }, new HtmlMetaTag[] { new HtmlMetaTag() { name = MetaName.author, content = "محمد بن سعيد" }, new HtmlMetaTag() { name = MetaName.description, content = "وبسايت شخصی محمد بن سعيد - فناوری اطلاعات" } }, null); //PublicDigiNotesInfo.ServerAddress + "/AboutUs"); return(View()); }