public ActionResult Detail(long id) { var service = _AdvertisementManager.CreateService(id); service.Click(); return(Redirect(service.url)); }
public ActionResult Edit(long?id) { Models.Advertisement.AdvertisementEdit model = new Models.Advertisement.AdvertisementEdit(); if (id.HasValue && id.Value > 0) { var adv = _AdvertisementManager.CreateService(id.Value); model = new Models.Advertisement.AdvertisementEdit { aid = adv.aid, content = adv.content, image = adv.image, order = adv.order, position = adv.position, title = adv.title, url = adv.url, }; } return(View(model)); }