Example #1
0
        public ActionResult Edit(int id)
        {
            UserInfo user = usermanager.GetUserByID(id);

            ViewBag.usersex = new SelectList(new string[] { "男", " 女" });
            return(View(user));
        }
Example #2
0
        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);
        }
Example #3
0
        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());
            }
        }
Example #4
0
        public ActionResult AddUpdateUser(int?uid)
        {
            UserInfoModel model = userInfoManager.GetUserByID(uid ?? 0);

            return(View(model));
        }
Example #5
0
        public string GetUserByID(int id)
        {
            UserInfoManager manager = new UserInfoManager();

            return(new JavaScriptSerializer().Serialize(manager.GetUserByID(id)));
        }