Ejemplo n.º 1
0
        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"]));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        // GET: QAManager/CategoryIdea

        public ActionResult Index(int ID)
        {
            var result = new IdeaCategoryDao().GetAllIdeaCategory(ID);

            TempData["grID"] = ID;
            return(View(result));
        }
Ejemplo n.º 4
0
        // 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());
        }
Ejemplo n.º 5
0
        public JsonResult GetCateIdeaByJs(int grCateId)
        {
            var result = new IdeaCategoryDao().GetIdeaCateByGr(grCateId);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }