コード例 #1
0
        public ActionResult Actions()
        {
            init();
            ActionResult retunValue;
            string       action    = "";
            string       subaction = "";
            int          id        = 0;

            if (RouteData.Values.ContainsKey("action"))
            {
                action = RouteData.Values["action"].ToString();
            }
            if (RouteData.Values.ContainsKey("subaction"))
            {
                subaction = RouteData.Values["subaction"].ToString();
            }
            if (RouteData.Values.ContainsKey("id"))
            {
                id = int.Parse(RouteData.Values["id"].ToString());
            }

            switch (subaction.ToLower())
            {
            case "details":
                retunValue = View("Action", ApiConfig.GetCampaign(id));
                break;

            case "poses":
                retunValue = View("ActionPoses", ApiConfig.GetCampaignDetail(id));
                break;

            default:
                retunValue = View();
                break;
            }
            return(retunValue);
        }