Пример #1
0
        public ActionResult Show()
        {
            T_User entity = new T_User();

            try
            {
                if (!String.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    entity = entityDao.GetById(Convert.ToString(Request.QueryString["id"]));
                }
            }
            catch (Exception ex) { }

            return(View("Show", entity));
        }
Пример #2
0
        //----------修改联系方式-----------------------
        public ActionResult phone(String p)
        {
            if (String.IsNullOrWhiteSpace(p))
            {
                return(Fail("error"));
            }

            String    uid      = Convert.ToString(Session["uid"]);
            T_UserDAO phonedao = new T_UserDAO();
            T_User    phone    = phonedao.GetById(uid);

            phone.phone = p;

            phonedao.Update(phone);
            int result = phonedao.Update(phone);

            if (result > 0)
            {
                Session["phone"] = p;
                return(Success("已通过!", null));
            }
            else
            {
                return(Success("已通过,但未记录", null));
            }
        }