diff options
author | marcinzelent <marcin@zelent.net> | 2017-02-26 00:46:36 +0100 |
---|---|---|
committer | marcinzelent <marcin@zelent.net> | 2017-02-26 00:46:36 +0100 |
commit | 7610b2d2a826a6d7dcac1faebfb00cdeec1cf6c8 (patch) | |
tree | a47378efd3a492707bb1eabd1a5784cd8ca2f183 | |
parent | fed18ffa89c2a24d4cbb30a7efe29f00aa5d529b (diff) |
Fixed sorting.
-rw-r--r-- | EventMaker/EventMaker/Model/EventCatalogSingleton.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs index d82c41c..9553017 100644 --- a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs +++ b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs @@ -74,7 +74,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) >= 0) + if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) > 0) { Events.Move(i, i + 1); sorted = true; @@ -87,7 +87,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) <= 0) + if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) < 0) { Events.Move(i, i + 1); sorted = true; @@ -100,7 +100,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) >= 0) + if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) > 0) { Events.Move(i, i + 1); sorted = true; @@ -113,7 +113,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) <= 0) + if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) < 0) { Events.Move(i, i + 1); sorted = true; |