public ActionResult RioPicView(int?page) { string ID = string.Empty; string title = "PicView"; string mode = "V"; bool isUser = false; if (Request.QueryString.Get("m") != null) { if (Request.QueryString.Get("m").Equals("E")) { title = "PicEdit"; mode = "E"; } } ViewBag.title = title; ClassNameModel cn = ClassNameModel.getClassName("pic"); ViewBag.className = cn; #region getData List <Rio_Pic> data = new List <Rio_Pic>(); if (Session["UserID"] != null) { ID = Session["UserID"].ToString(); data = PicModel.getUserAllPicByID(ID); } if (Request.QueryString.Get("vid") != null) { ID = Request.QueryString.Get("vid"); data = PicModel.getUserPicEnableByID(ID); } if (Session["UserID"] != null && Request.QueryString.Get("vid") != null) { if (Session["UserID"].ToString().Equals(Request.QueryString.Get("vid"))) { ID = Session["UserID"].ToString(); isUser = true; data = PicModel.getUserAllPicByID(ID); } } if (Session["UserID"] == null && Request.QueryString.Get("vid") == null) { return(RedirectToAction("Login", "Rio_Account", null)); } var pageNumeber = page ?? 1; var pageData = data.ToPagedList(pageNumeber, pageSize); ViewBag.vid = ID; ViewBag.mode = mode; ViewBag.isUser = isUser; #endregion return(View(pageData)); }
public ActionResult CompressionView(int?page) { int pageSize = 20; int userSN = 0; bool isUser = false; string ID = string.Empty; string mode = "V"; string title = "CompressionView"; List <Rio_Compression> data = new List <Rio_Compression>(); if (Request.QueryString.Get("m") != null) { if (Request.QueryString.Get("m").Equals("E")) { title = "CompressionEdit"; mode = "E"; } } if (Session["UserID"] != null) { int.TryParse(Session["UserSN"].ToString(), out userSN); data = CompressionModel.getCompressionByUserSN(userSN); } if (Request.QueryString.Get("vid") != null) { ID = Request.QueryString.Get("vid"); userSN = AccountModel.getAccountByID(ID).SN; data = CompressionModel.getCompressionClientByUserSN(userSN); } if (Request.QueryString.Get("vid") != null && Session["UserID"] != null) { if (Request.QueryString.Get("vid") == Session["UserID"].ToString()) { int.TryParse(Session["UserSN"].ToString(), out userSN); data = CompressionModel.getCompressionByUserSN(userSN); isUser = true; } } if (Session["UserID"] == null && Request.QueryString.Get("vid") == null) { return(RedirectToAction("Login", "Rio_Account", null)); } ViewBag.vid = ID; ViewBag.mode = mode; ViewBag.title = title; ViewBag.isUser = isUser; ViewBag.className = ClassNameModel.getClassName("compression"); var pageNumeber = page ?? 1; var pageData = data.ToPagedList(pageNumeber, pageSize); return(View(pageData)); }
public ActionResult RioDocView(int?page) { int pageNumber = page ?? 1; string ID = string.Empty; string title = "DocView"; string mode = "V"; bool isUser = false; List <Rio_Doc> data = new List <Rio_Doc>(); ClassNameModel cn = ClassNameModel.getClassName("doc"); if (Request.QueryString.Get("m") != null) { if (Request.QueryString.Get("m").Equals("E")) { title = "DocEdit"; mode = "E"; } } ViewBag.title = title; if (Session["UserID"] != null) { ID = Session["UserID"].ToString(); data = DocModel.getUserAllDocByID(ID); } if (Request.QueryString.Get("vid") != null) { ID = Request.QueryString.Get("vid").ToString(); data = DocModel.getUserDocEnableListByID(ID); } if (Session["UserID"] != null && Request.QueryString.Get("vid") != null) { if (Session["UserID"].ToString().Equals(Request.QueryString.Get("vid"))) { ID = Session["UserID"].ToString(); data = DocModel.getUserAllDocByID(ID); isUser = true; } } if (Session["UserID"] == null && Request.QueryString.Get("vid") == null) { return(RedirectToAction("Login", "Rio_Account", null)); } ViewBag.mode = mode; ViewBag.vid = ID; ViewBag.isUser = isUser; ViewBag.className = cn; var pageNumeber = page ?? 1; var pageData = data.ToPagedList(pageNumeber, 24); return(View(pageData)); }
public ActionResult RioAlbumView(int?page) { string ID = string.Empty; bool isUser = false; List <Vw_Album> data = new List <Vw_Album>(); if (Session["UserID"] != null) { ID = Session["UserID"].ToString(); data = AlbumModel.getUserAllVwAlbumList(ID).OrderByDescending(o => o.CreateDate).ToList(); } if (Request.QueryString.Get("vid") != null) { ID = Request.QueryString.Get("vid").ToString(); data = AlbumModel.getUsertVwAlbumEnableListByID(ID).OrderByDescending(o => o.CreateDate).ToList(); } if (Session["UserID"] != null && Request.QueryString.Get("vid") != null) { if (Session["UserID"].ToString().Equals(Request.QueryString.Get("vid"))) { ID = Session["UserID"].ToString(); data = AlbumModel.getUserAllVwAlbumList(ID).OrderByDescending(o => o.CreateDate).ToList(); isUser = true; } } if (Session["UserID"] == null && Request.QueryString.Get("vid") == null) { return(RedirectToAction("Login", "Rio_Account", null)); } ViewBag.vid = ID; ViewBag.isUser = isUser; var pageNumber = page ?? 1; var pageData = data.ToPagedList(pageNumber, 20); ViewBag.className = ClassNameModel.getClassName("albumView"); return(View(pageData)); }
public ActionResult RioAlbumContent(int?SN, int?page) { int aSN = SN ?? 0; int pageNumber = page ?? 1; string userID = string.Empty; bool isUser = false; Vw_Album va = new Vw_Album(); if (aSN == 0 || Request.QueryString.Get("vid") == null) { return(RedirectToAction("Login", "Rio_Account", null)); } if (Session["UserID"] != null) { userID = Session["UserID"].ToString(); } if (Request.QueryString.Get("vid").Equals(userID)) { isUser = true; } va = AlbumModel.getVwAlbum(aSN); if (isUser && va.IsEnable == false) { return(RedirectToAction("RioAlbumView", "Rio_Album", new { vid = Request.QueryString.Get("vid") })); } ViewBag.aSN = aSN; ViewBag.VwAlbum = va; ViewBag.isUser = isUser; ViewBag.vid = Request.QueryString.Get("vid"); ViewBag.className = ClassNameModel.getClassName("albumContent"); ViewBag.getJoinPic = AlbumJoinPicModel.getUpdateJoinPic(aSN).ToPagedList(pageNumber, 20); return(View(db.Rio_Album.ToList())); }