예제 #1
0
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string userRegesit(HttpContext context)
        {
            Json   jsonResult = new Json();
            string username   = context.Request["username"];
            string nickname   = context.Request["nickname"];
            string sex        = context.Request["sex"];
            string phone      = context.Request["phone"];
            string remark     = context.Request["remark"];
            string email      = context.Request["email"];
            int    result     = ms.insertUsers(username, nickname, phone, sex, remark, email);

            if (result > 0)
            {
                jsonResult.Success = true;
                jsonResult.Msg     = "添加成功";
            }
            else
            {
                jsonResult.Success = false;
                jsonResult.Msg     = "添加失败";
            }
            string strJson = JsonConvert.SerializeObject(jsonResult);

            return(strJson);
        }