Ejemplo n.º 1
0
        public ActionResult SelfImages(int id, int page)
        {
            ViewData["CurrMenu"] = "�������";
            int userID = UserID;
            bizUserImageType bt = new bizUserImageType();
            int pageSize = 16;
            int count;
            string strBar = "";

            bizUserImages bi = new bizUserImages();
            List<UserImages> list = bi.List(userID, id, pageSize, page - 1, out count);
            ViewData["PageList"] = Page.GetPageList("/user/selfimages/"+ id +"_$page$.html", count, pageSize, page);
            if (id != 0)
            {
                UserImageType model = bt.Get(id);
                strBar=MenuBar.Start()
                    .AddMenu("�������", "/user/SelfImagesFolder.html")
                    .AddMenu(model.TypeName, "/user/selfImages/" + model.UserImageTypeID + "_1.html")
                    .GetMenuHtml();
            }
            ViewData["TypeList"] = bt.ListByUser(userID);
            ViewData["Bar"] = strBar;
            ViewData["ID"] = id;
            ViewData["ImageNum"] = Public.UserHelper.GetRemainImageNum(userID);
            return View(list);
        }
Ejemplo n.º 2
0
        public ActionResult UserImg(int userID,int typeID, int pageNo)
        {
            bizUsers b = new bizUsers();
            Users model = b.Get(userID);
            int pageSize = 16;
            int count;
            string strBar = "";

            bizUserImageType bt = new bizUserImageType();
            bizUserImages bi = new bizUserImages();
            List<UserImages> list = bi.List(model.UserID,typeID, pageSize, pageNo - 1, out count);
            ViewData["PageList"] = Page.GetPageList("/user/img/" + userID + "_"+ typeID +"_$page$.html", count, pageSize, pageNo);
            ViewData["UserImages"] = list;
            if (typeID != 0)
            {
                UserImageType modelType = bt.Get(typeID);
                if (modelType.LookType == 0 && UserID != modelType.UserID && UserCommon.CheckBBSAdminRight(AdminType))
                {
                    return Redirect("/user/imgfolder/" + userID + ".html");
                }

                strBar = MenuBar.Start()
                    .AddMenu("�������", "/user/imgfolder/"+ userID +".html")
                    .AddMenu(modelType.TypeName, "/user/img/"+userID +"_" + modelType.UserImageTypeID + "_1.html")
                    .GetMenuHtml();
            }
            ViewData["Bar"] = strBar;
            return View(model);
        }
Ejemplo n.º 3
0
        public ActionResult UserImages()
        {
            string userName = Request.QueryString["userName"] == null ? "" : Request.QueryString["userName"].ToString();
            string imagePath = Request.QueryString["imagePath"] == null ? "" : Request.QueryString["imagePath"].ToString();
            bizUserImagesCheck buk = new bizUserImagesCheck();
            bizUserImages bui = new bizUserImages();
            List<UserImagesCheck> listCheck = buk.ListNew(20);
            ViewData["CheckList"] = listCheck;
            int pageSize = 100;
            int page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            int count;
            List<UserImagesDetail> list = bui.List(userName,imagePath, pageSize, page - 1, out count);
            ViewData["PageList"] = Page.GetPageList("UserImages?userName="******"&imagePath="+imagePath, count, pageSize, page, true);

            return View(list);
        }