public ActionResult Save(string json)
        {
            JObject jObj = new JObject();

            if (!string.IsNullOrWhiteSpace(json))
            {
                LuckyWheel wheel = JsonConvert.DeserializeObject <LuckyWheel>(json);
                if (wheel != null)
                {
                    wheel.UpdateDate  = DateTime.Now;
                    wheel.CreatorUser = User.Identity.Name;
                    wheel.UpdateUser  = User.Identity.Name;
                    bool result = LuckyWheelManager.Save(wheel);
                    if (result)
                    {
                        using (var client = new Tuhu.Service.Activity.ActivityClient())
                        {
                            var clientReuslt = client.RefreshLuckWheelCache(wheel.ID.Trim());
                            clientReuslt.ThrowIfException(true);
                        }
                    }
                    jObj.Add("result", result == true ? 1 : 0);
                }
            }
            else
            {
                jObj.Add("result", 0);
            }

            return(Json(jObj.ToString(), JsonRequestBehavior.AllowGet));
        }
        public ActionResult Delete(string id)
        {
            JObject json = new JObject();

            json.Add("result", LuckyWheelManager.Delete(id) == true ? 1 : 0);
            return(Json(json.ToString()));
        }
        public ActionResult GetValidateLuckyWheel(string id)
        {
            var result = LuckyWheelManager.GetTableList("");

            if (result?.Where(_ => _.ID.ToLower() == id.ToLower().Trim()).Count() > 0)
            {
                return(Json("{\"status\":1}"));
            }
            else
            {
                return(Json("{\"status\":0}"));
            }
        }
        public ActionResult WheelList(string id = "")
        {
            Guid guid;

            if (Guid.TryParse(id, out guid))
            {
                LuckyWheel model = LuckyWheelManager.GetEntity(guid.ToString());
                return(View(model));
            }
            else
            {
                return(View(new LuckyWheel()));
            }
        }
        //
        // GET: /LuckyWheel/

        public ActionResult List()
        {
            List <LuckyWheel> list = LuckyWheelManager.GetTableList("");

            return(View(list));
        }