Пример #1
0
        /// <summary>
        /// 盟友注册申请
        /// </summary>
        private void AllyApply()
        {
            int    uid        = GetFormValue("userid", 0);
            int    mid        = GetFormValue("mid", 0);
            string nickName   = GetFormValue("nickname", "");
            string pwd        = GetFormValue("pwd", "");
            string username   = GetFormValue("username", "");
            string usermobile = GetFormValue("usermobile", "");
            int    sex        = GetFormValue("sex", 0);

            if (mid > 0)
            {
                uid = mid;
                uid = uid - 2000;
            }
            if (uid > 0)
            {
                ApiStatusCode code = ApiStatusCode.OK;

                if (UserLogic.IsExist(uid))
                {
                    bool flag = UserLogic.AllyApply(uid, usermobile, pwd, nickName, username, sex, ref code);
                    json = JsonHelper.JsonSerializer(new ResultModel(code));
                }
                else
                {
                    json = JsonHelper.JsonSerializer(new ResultModel(ApiStatusCode.无效的盟主ID));
                }
            }
            else
            {
                json = JsonHelper.JsonSerializer(new ResultModel(ApiStatusCode.无效的盟主ID));
            }
        }
Пример #2
0
 public ActionResult AllyApply(int userId, string mobile, string password
                               , string nickname, string userName
                               , int sex)
 {
     try
     {
         ApiStatusCode apiCode = ApiStatusCode.OK;
         UserLogic.AllyApply(userId, mobile, password, nickname, userName, sex, ref apiCode);
         return(Json(new ResultModel(apiCode)));
     }
     catch (Exception ex)
     {
         LogHelper.Log(string.Format("AllyInfo user:message:{0},StackTrace:{1}", ex.Message, ex.StackTrace), LogHelperTag.ERROR);
         return(Json(new ResultModel(ApiStatusCode.SERVICEERROR)));
     }
 }