|
|
@ -101,22 +101,7 @@ namespace BWP.B3ClientService.Rpcs |
|
|
[Rpc] |
|
|
[Rpc] |
|
|
public static List<WordPair> GetPurchaseTypeList(string input, string args, int top) |
|
|
public static List<WordPair> GetPurchaseTypeList(string input, string args, int top) |
|
|
{ |
|
|
{ |
|
|
var query = new DQueryDom(new JoinAlias(typeof(PurchaseType))); |
|
|
|
|
|
if (top > 50) |
|
|
|
|
|
top = 50; |
|
|
|
|
|
query.Range = SelectRange.Top(top); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("ID")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("Name")); |
|
|
|
|
|
var list = new List<WordPair>(); |
|
|
|
|
|
using (var session = Dmo.NewSession()) |
|
|
|
|
|
{ |
|
|
|
|
|
using (var reader = session.ExecuteReader(query)) |
|
|
|
|
|
{ |
|
|
|
|
|
while (reader.Read()) |
|
|
|
|
|
list.Add(new WordPair(reader[1].ToString(), reader[0].ToString())); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return list; |
|
|
|
|
|
|
|
|
return GetBaseInfoList<PurchaseType>(input, args, top); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Rpc] |
|
|
[Rpc] |
|
|
|