public ActionResult Edit(int id) { UserInfo user = usermanager.GetUserByID(id); ViewBag.usersex = new SelectList(new string[] { "男", " 女" }); return(View(user)); }
public UserInfo GetUser() { UserInfo user = null; string userID = GetUserID(); if (string.IsNullOrWhiteSpace(userID) == false) { UserInfoManager mUser = new UserInfoManager(); user = mUser.GetUserByID(Guid.Parse(userID)); } return(user); }
public string DeleteUser(int id) { try { UserInfoManager manager = new UserInfoManager(); UserInfoEntity entity = manager.GetUserByID(id); if (entity != null) { entity.Valid = "F"; entity.CreateTime = DateTime.Now; entity.CreateTime = DateTime.Now; manager.Update(entity); } return("success"); } catch (Exception e) { return(e.ToString()); } }
public ActionResult AddUpdateUser(int?uid) { UserInfoModel model = userInfoManager.GetUserByID(uid ?? 0); return(View(model)); }
public string GetUserByID(int id) { UserInfoManager manager = new UserInfoManager(); return(new JavaScriptSerializer().Serialize(manager.GetUserByID(id))); }