示例#1
0
        public ActionResult KfCreate(KfModel model, bool continueEditing)
        {
            var token  = this._cacheManager.GetCache(CACHE_ACCESSTOKEN).Get(CACHE_ACCESSTOKEN, () => GetAccessToken());
            var kValue = new Dictionary <string, string>();

            kValue.Add("kf_account", model.kf_account + "@wochegang1568");
            kValue.Add("nickname", model.nickname);
            kValue.Add("password", model.password);
            string url    = string.Format(kf_create_url, token.access_token);
            var    result = HttpUtility.Post(url, kValue);

            if (result.errcode == "0")
            {
                return(KfList());
            }
            else
            {
                ViewData["error"] = result.errmsg;
                return(View(model));
            }
        }
示例#2
0
        public ActionResult KfCreate()
        {
            var model = new KfModel();

            return(View(model));
        }