Example #1
0
 public ActionResult SaveEditChannel(GuiChannel channel, int channelId, int? userId, SelectedGenrePostModel model)
 {
     if (userId.HasValue)
     {
         if (model.ChosenGenres == null) model.ChosenGenres = new List<int>();
         using (RentItServiceClient proxy = new RentItServiceClient())
         {
             proxy.UpdateChannel(channelId, userId.Value, channel.Name, channel.Description, 0.0, 0.0, model.ChosenGenres.ToArray());
         }
         return RedirectToAction("SelectChannel", "Channel", new { channelId = channelId, userId = userId });
     }
     return RedirectToAction("Index", "Home");
 }