|
@@ -55,8 +55,21 @@ namespace InABox.Core
|
|
|
public static IEnumerable<ImportMapping> ExtractMappings(Type type, ImportMappingType Import)
|
|
|
{
|
|
|
var results = new List<ImportMapping>();
|
|
|
-
|
|
|
- var props = DatabaseSchema.Properties(type).OrderBy(x => CoreUtils.GetPropertySequence(x));
|
|
|
+
|
|
|
+ var props = DatabaseSchema.Properties(type)
|
|
|
+ .OrderBy(x => x.Page, Comparer<string>.Create((x, y) =>
|
|
|
+ {
|
|
|
+ if(x.IsNullOrWhiteSpace() || x.Equals("General"))
|
|
|
+ {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else if(y.IsNullOrWhiteSpace() || y.Equals("General"))
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ return x.CompareTo(y);
|
|
|
+ }))
|
|
|
+ .ThenBy(x => CoreUtils.GetPropertySequence(x));
|
|
|
|
|
|
//var keys = CoreUtils.PropertyList(type, x => true, true).Keys.ToArray();
|
|
|
foreach (var prop in props)
|