예제 #1
0
 public static int TotalChannelsWithFilter(AdvancedSearchModel model)
 {
     int count;
     using (RentItServiceClient proxy = new RentItServiceClient())
     {
         count = proxy.CountAllChannelsWithFilter((ChannelSearchArgs)model);
     }
     return count;
 }
예제 #2
0
 public PartialViewResult AdvancedSearchWithArgs(AdvancedSearchModel model)
 {
     if (model.StartIndex < 0)
     {
         model.StartIndex = 0;
         model.EndIndex = 10;
     }
     if (model.SearchString == null)
         model.SearchString = "";
     Channel[] channels;
     using (RentItServiceClient proxy = new RentItServiceClient())
     {
         ChannelSearchArgs searchArgs = (ChannelSearchArgs)model;
         channels = proxy.GetChannels(searchArgs);
     }
     Tuple<List<GuiChannel>, AdvancedSearchModel> tuple = new Tuple<List<GuiChannel>, AdvancedSearchModel>(GuiClassConverter.ConvertChannels(channels), model);
     return PartialView("ChannelListForAdvancedSearch", tuple);
 }