// GET: Edit public ActionResult Index(string id) { appbase appbase = new appbase(); user_account userAccount = new user_account(); if (Request.Cookies["PsdH5ShowUserCode"] == null) { return(RedirectToAction("Login", "Admin")); } if (id != null) { try { id = DESEncrypt.Decrypt(id); if (id != null) { userAccount = AppTools.GetUserCodeToUseraccountModel( Request.Cookies["PsdH5ShowUserCode"].Value); if (!isMemberApp(userAccount.UserCode, int.Parse(id))) { return(RedirectToAction("Index", "Error", new { id = 404, msg = "无权限请求" })); } } else { return(RedirectToAction("Index", "Error", new { id = 404, msg = "错误请求" })); } //判断操作权限 } catch (Exception es) { return(RedirectToAction("Index", "Error", new { id = 404, msg = es.ToString() })); throw; } appbase = new Psd.H5Show.BLL.appbase().GetModel(int.Parse(id)); } else { return(RedirectToAction("Applist", "Admin")); } ViewBag.appCode = DESEncrypt.Encrypt(appbase.ID.ToString()); ViewBag.AppBase = appbase; //Response.Write(id); return(View()); }