public ActionResult FindUser(int id) { try { CMS_User userFilter = new CMS_User(); userFilter.uid = id; var list = CMS_User_BLL.Login(userFilter); return(Json(list)); } catch (Exception error) { throw error; } }
//查找用户 public ActionResult Find(int uid) { try { CMS_User userFilter = new CMS_User(); userFilter.uid = uid; var list = CMS_User_BLL.Login(userFilter); return(Json(list, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public ActionResult ResponseLogin(string uname, string pwd) { try { CMS_User userFilter = new CMS_User(); userFilter.uname = uname; userFilter.upwd = pwd; var list = CMS_User_BLL.Login(userFilter); if (list.Count > 0) { CMS_User user = list[0] as Model.CMS_User; Session["userID"] = user.uid; } return(Json(list)); } catch (Exception error) { throw error; } }
// GET: Personal_Profile public ActionResult Personal_Profile(int uid = 0) { try { if (uid == 0) { Response.Redirect("/Login/Login"); } CMS_User userFilter = new CMS_User(); userFilter.uid = uid; List <CMS_User> list = CMS_User_BLL.Login(userFilter); //查询用户 ViewBag.userList = list; var countInCommentSum = CMS_User_BLL.FindComSum(userFilter); //查询用户评论数 ViewBag.countInCommentSum = countInCommentSum; return(View()); } catch (Exception error) { throw error; } }