public ActionResult EditProduct(int advertisementId,int categoryId,int productId)
 {
     var advertisement = productRepository.GetAdvertisementById(advertisementId);
     AdvertisementViewModel adViewModel = new AdvertisementViewModel {
                                                                         AdvertisementId=advertisement.Id
                                                                        ,Title = advertisement.Title
                                                                        ,StartDate = advertisement.StartDate.ToShortDateString()
                                                                        ,FinishDate=advertisement.EndDate.ToShortDateString() };
     var productview = productRepository.EditProduct(categoryId,productId);
     ViewBag.ProductInfo = renderEngine.Render(productview);
     return View(adViewModel);
 }
 public ActionResult AddProduct(AdvertisementViewModel  advertisemnt)
 {
     var productAdd = productRepository.AddProduct(advertisemnt.CategoryId);
     ViewBag.ProductInfo = renderEngine.Render(productAdd);
     return View(advertisemnt);
 }