public ActionResult Update(CategoryGroupIdea model)
        {
            model.ModifiedBy = ((UserLogin)Session[ModelPr.CommonClass.CommonCls.User_session]).Username;
            var result = new CateGrIdeaDao().UpdateGrCateIdea(model);

            return(RedirectToAction("Index"));
        }
        // 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 ActionResult Delete(int ID)
        {
            var result = new CateGrIdeaDao().DeleteCateGrIdea(ID);

            return(RedirectToAction("Index"));
        }
        public ActionResult Update(int ID)
        {
            var result = new CateGrIdeaDao().GetCateGrIdeaByID(ID);

            return(View(result));
        }
        // GET: QAManager/GrCateIdea
        public ActionResult Index()
        {
            var result = new CateGrIdeaDao().GetAllGrCateIdea();

            return(View(result));
        }