Пример #1
0
        public ActionResult Create(UnHashtags hashtag)
        {
            ModelState.Remove("HashtagUser");
            ModelState.Remove("HashtagUser_Id");
            if (ModelState.IsValid)
            {
                hashtagManager.Insert(hashtag);
                return(RedirectToAction("Index"));
            }

            ViewBag.CategoriesId = new SelectList(hashtagManager.List(), "Id", "Name", hashtag.CategoriesId);
            return(View(hashtag));
        }
Пример #2
0
        public ActionResult Department()
        {
            //if (id == null)
            //{
            //    //todo: 404 hata sayfası gerçekleştir
            //}

            //CategoryManager cm = new CategoryManager();
            //UnCategories cat = cm.GetCategoryId(id);

            //if (cat == null)
            //{
            //    //todo: 404 sayfası gerçekleştir
            //}

            return(View(hashtagManager.List()));
        }
Пример #3
0
 // Not oluşturulurken hashtag'de seçildiğinden hashtag bilgileri dolduruluyor(combobox vs'ye doldur)
 public ActionResult Create()
 {
     ViewBag.HashtagsId = new SelectList(hastagManager.List(), "Id", "Code");
     return(View());
 }