public ActionResult Update(IdeaCategory model) { model.ModifiedBy = ((UserLogin)Session[ModelPr.CommonClass.CommonCls.User_session]).Username; var result = new IdeaCategoryDao().UpdateIdeaCategory(model); return(RedirectToAction("Index/" + (int)TempData["grID"])); }
public ActionResult Update(int id, int grID) { ViewBag.GroupCateIdea = new SelectList(new CateGrIdeaDao().GetAllGrCateIdea(), "CategoryGroupIdeaID", "CategoryGroupName", grID); var result = new IdeaCategoryDao().GetIdeaCateByID(id); return(View(result)); }
// GET: QAManager/CategoryIdea public ActionResult Index(int ID) { var result = new IdeaCategoryDao().GetAllIdeaCategory(ID); TempData["grID"] = ID; return(View(result)); }
// GET: Home public ActionResult Index() { List <CategoryIdeaView> lvIdeaCateView = new List <CategoryIdeaView>(); List <CategoryGroupIdea> listCateGroupIdea = new List <CategoryGroupIdea>(); listCateGroupIdea = new CateGrIdeaDao().GetAllGrCIBySt(); foreach (var item in listCateGroupIdea) { CategoryIdeaView categoryIdeaView = new CategoryIdeaView(); categoryIdeaView.CateGr = item; List <IdeaCategoryModelView> lvIdeaCate = new IdeaCategoryDao() .GetAllCateIDByGrId(item.CategoryGroupIdeaID) .Select(x => new IdeaCategoryModelView { CategoryDescription = x.CategoryDescription, IdeaCategoryID = x.IdeaCategoryID, CategoryName = x.CategoryName, LatestPost = (new IdeaDao().GetLastestPost(x.IdeaCategoryID).IdeaTitle).ToString(), IdLatestPost = new IdeaDao().GetLastestPost(x.IdeaCategoryID).IdeaID, CountIdea = (new IdeaDao().GetAllIdeaByCateIdSt(x.IdeaCategoryID).Count()) }).ToList(); categoryIdeaView.lvIdeaCate = lvIdeaCate; lvIdeaCateView.Add(categoryIdeaView); } ViewBag.CateGr = lvIdeaCateView; return(View()); }
public JsonResult GetCateIdeaByJs(int grCateId) { var result = new IdeaCategoryDao().GetIdeaCateByGr(grCateId); return(Json(result, JsonRequestBehavior.AllowGet)); }