Exemple #1
0
        public JsonResult AddWPUser(WPUserAddModel model)
        {
            var result = new JsonObject();

            try
            {
                using (var db = new SQLServerProxy())
                {
                    var wordPressBL = new WordPressBL(db._wplocalEntities);
                    wordPressBL.InsertWPUser(model.LoginID, model.LastName, model.FirstName, model.Email);

                    db.Dispose();
                }
                result.SetResult(true);
            }
            catch (Exception)
            {
                result.AddError("errorMessage", "サーバーエラーが発生しました。");
            }

            return(Json(result, "text/json", Encoding.UTF8, JsonRequestBehavior.DenyGet));
        }