/[xmltv_parser]/trunk/libxmltv/Core/DataSourceBindable.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/DataSourceBindable.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Core/DataSourceBindable.cs	2013/03/17 03:57:57	227
+++ trunk/libxmltv/Core/DataSourceBindable.cs	2013/04/03 05:28:26	252
@@ -116,8 +116,8 @@
                     {
                         case "channelnumber": ordered = descending ? list.OrderByDescending(s => s.ChannelNumber) : list.OrderBy(s => s.ChannelNumber); break;
                         case "channelname": ordered = descending ? list.OrderByDescending(s => s.ChannelName) : list.OrderBy(s => s.ChannelName); break;
-                        case "start": ordered = descending ? list.OrderByDescending(s => s.Start) : list.OrderBy(s => s.Start); break;
-                        case "stop": ordered = descending ? list.OrderByDescending(s => s.Stop) : list.OrderBy(s => s.Stop); break;
+                        case "start": ordered = descending ? list.OrderByDescending(s => DateTime.Parse(s.Start)) : list.OrderBy(s => DateTime.Parse(s.Start)); break;
+                        case "stop": ordered = descending ? list.OrderByDescending(s => DateTime.Parse(s.Stop)) : list.OrderBy(s => DateTime.Parse(s.Stop)); break;
                         case "description": ordered = descending ? list.OrderByDescending(s => s.Description) : list.OrderBy(s => s.Description); break;
                         case "title": ordered = descending ? list.OrderByDescending(s => s.Title) : list.OrderBy(s => s.Title); break;
                         case "subtitle": ordered = descending ? list.OrderByDescending(s => s.SubTitle) : list.OrderBy(s => s.SubTitle); break;
@@ -131,8 +131,8 @@
                         {
                             case "channelnumber": ordered = descending ? ordered.ThenByDescending(s => s.ChannelNumber) : ordered.ThenBy(s => s.ChannelNumber); break;
                             case "channelname": ordered = descending ? list.OrderByDescending(s => s.ChannelName) : list.OrderBy(s => s.ChannelName); break;
-                            case "start": ordered = descending ? ordered.ThenByDescending(s => s.Start) : ordered.ThenBy(s => s.Start); break;
-                            case "stop": ordered = descending ? ordered.ThenByDescending(s => s.Stop) : ordered.ThenBy(s => s.Stop); break;
+                            case "start": ordered = descending ? ordered.ThenByDescending(s => DateTime.Parse(s.Start)) : ordered.ThenBy(s => DateTime.Parse(s.Start)); break;
+                            case "stop": ordered = descending ? ordered.ThenByDescending(s => DateTime.Parse(s.Stop)) : ordered.ThenBy(s => DateTime.Parse(s.Stop)); break;
                             case "description": ordered = descending ? ordered.ThenByDescending(s => s.Description) : ordered.ThenBy(s => s.Description); break;
                             case "title": ordered = descending ? ordered.ThenByDescending(s => s.Title) : ordered.ThenBy(s => s.Title); break;
                             case "subtitle": ordered = descending ? ordered.ThenByDescending(s => s.SubTitle) : ordered.ThenBy(s => s.SubTitle); break;
@@ -313,7 +313,7 @@
                 catch (Exception ex) { throw ex; }
             }
 
-            list = new ProgramDefinitionList(list.OrderBy(s => s.Start).ToList());
+            list = new ProgramDefinitionList(list.OrderBy(s => DateTime.Parse(s.Start)).ToList());
 
             bindable = list;
             return bindable;

 

  ViewVC Help
Powered by ViewVC 1.1.22