Example #1
0
        public JsonResult Add(UserActivateTokenVModel model)
        {
            var result = new JsonResultModel();

            if (ModelState.IsValid)
            {
                //add
                result.ResultState = UserActivateTokens.AddUserActivateToken(UserActivateTokens.UserActivateTokenVModelToInfo(model)) > 0;
            }
            else
            {
                result.ResultState = false;
                result.Message     = ModelStateHelper.GetAllErrorMessage(ModelState);
            }

            return(Json(result));
        }
Example #2
0
 /// <summary>
 /// 添加令牌
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public long Add(UserActivateTokenVModel model)
 {
     return
         (UserActivateTokens.AddUserActivateToken(
              UserActivateTokens.UserActivateTokenVModelToInfo(model)));
 }