/// <summary>
 /// �޸��˻���Ϣ���봫��Post���ݣ�Json��
 /// </summary>
 /// <returns></returns>
 public ResponseMsg UpdataAccount(int? age, string name, string phone, bool? sex)
 {
     Cf_HttpWeb _httpweb = new Cf_HttpWeb();
     _httpweb.EncodingSet = "utf-8"; ;
     UserInfo userInfo = new UserInfo
     {
         Age = age,
         Name = name,
         Phone = phone,
         Sex = sex
     };
     _httpweb.ContentType = "text/html";
     _httpweb.UserDate = JsonConvert.SerializeObject(userInfo);
     string url = "http://localhost:32839/api/restful/UserInfo/UpdataAccount";
     string str = _httpweb.PostOrGet(url, HttpMethod.POST).HtmlValue;
     return JsonConvert.DeserializeObject<ResponseMsg>(str);
 }
        public HttpResponseMessage CreatAccount(string account, string password)
        {
            UserInfo userInfo = this._iUserInfoService.Where(o => o.Account == account).FirstOrDefault();
            if (userInfo != null) return JsonHelp.GetJsonContent(0, "此账户已经被注册");

            UserInfo newUserInfo = new UserInfo
            {
                UserId = Guid.NewGuid(),
                Account = account,
                Password = password,
                SubTime = DateTime.Now,
                RegisteTime = DateTime.Now
            };

            // 缓存
            this._RedisCache.Set(account, Mapper.Map<DataUserInfo>(newUserInfo));

            return this._iUserInfoService.CreatAccount(newUserInfo)
                ? JsonHelp.GetJsonContent(200, "已经成功创建")
                : JsonHelp.GetJsonContent(0, "创建失败");
        }
 /// <summary>
 /// 添加一个新的用户
 /// </summary>
 /// <param name="userInfo"></param>
 /// <returns></returns>
 public bool CreatAccount(UserInfo userInfo)
 {
     return this.Add(userInfo);
 }