Ejemplo n.º 1
0
        public virtual ActionResult Add()
        {
            IList <Category> lstCategories = _categoryService.GetAll();

            ViewBag.CategoriesDropDownList = new SelectList(lstCategories, "Id", "Name");

            ViewBag.ArticleStatus = DropDownList.Status();
            ViewBag.CommentStatus = DropDownList.CommentStatus();

            return(PartialView(MVC.Admin.Article.Views._Add));
        }
Ejemplo n.º 2
0
        public virtual ActionResult Edit(int id)
        {
            AddUpdateArticleModel selectedArticle = _articleService.GetUpdateData(id);

            IList <Category> lstCategories = _categoryService.GetAll();

            ViewBag.CategoriesDropDownList = new SelectList(lstCategories, "Id", "Name", selectedArticle.CategoryId);

            ViewBag.ArticleStatus = DropDownList.Status(selectedArticle.ArticleStatus);
            ViewBag.CommentStatus = DropDownList.CommentStatus(selectedArticle.CommentStatus);

            return(PartialView(MVC.Admin.Article.Views._Edit, selectedArticle));
        }
Ejemplo n.º 3
0
        public virtual ActionResult Add()
        {
            IList <PageDropDownList> lstPages = _pageSerivce.DropDownListData();

            lstPages.Insert(0, new PageDropDownList {
                Id = -1, Title = "بدون مادر"
            });
            ViewBag.ParentPagesList = new SelectList(lstPages, "Id", "Title");

            ViewBag.PageStatus    = DropDownList.Status();
            ViewBag.CommentStatus = DropDownList.CommentStatus();

            return(PartialView(MVC.Admin.Page.Views._Add));
        }
Ejemplo n.º 4
0
        public virtual ActionResult Edit(int id)
        {
            EditPageModel selectedPage = _pageSerivce.GetEditingData(id);

            IList <PageDropDownList> lstPages = _pageSerivce.DropDownListData(selectedPage.Id);

            lstPages.Insert(0, new PageDropDownList {
                Id = -1, Title = "بدون مادر"
            });
            ViewBag.ParentPagesList = new SelectList(lstPages, "Id", "Title", selectedPage.ParentId);

            ViewBag.PageStatus    = DropDownList.Status(selectedPage.Status);
            ViewBag.CommentStatus = DropDownList.CommentStatus(selectedPage.CommentStatus);

            return(PartialView(MVC.Admin.Page.Views._Edit, selectedPage));
        }