コード例 #1
0
        //// GET: Campaigns
        //public ActionResult Index()
        //{
        //    return View(db.Campaigns.ToList());
        //}

        // GET: Campaigns/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CampaignEditView campaign = CampaignEditHelpers.GetCampaignEditView(db, id.Value, User);

            if (campaign == null)
            {
                return(HttpNotFound());
            }
            return(View(campaign));
        }
コード例 #2
0
        // GET: Campaigns/Edit/5
        public ActionResult Edit(Guid?id, bool showHistory)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CampaignEditView campaign = CampaignEditHelpers.GetCampaignEditView(db, id.Value, User);

            if (campaign == null)
            {
                return(HttpNotFound());
            }

            ViewBag.ShowHistory = showHistory;

            return(View(campaign));
        }