-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathAppQuery.cs
843 lines (715 loc) · 28.6 KB
/
AppQuery.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.IO;
using System.Collections;
using System.Reflection;
using System.Threading;
using System.Diagnostics;
using System.Net.Mail;
using DigitalPlatform; // Stop类
using DigitalPlatform.rms.Client;
using DigitalPlatform.Xml;
using DigitalPlatform.IO;
using DigitalPlatform.Text;
using DigitalPlatform.Script;
using DigitalPlatform.MarcDom;
using DigitalPlatform.Marc;
using DigitalPlatform.Message;
using DigitalPlatform.rms.Client.rmsws_localhost;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
namespace DigitalPlatform.LibraryServer
{
/// <summary>
/// 本部分是和XML检索式加工相关的代码
/// </summary>
public partial class LibraryApplication
{
// 检查检索式内有没有超越规定读者检索的数据库
// return:
// -1 error
// 0 没有超越要求
// 1 超越了要求
public int CheckReaderOnlyXmlQuery(string strSourceQueryXml,
out string strError)
{
strError = "";
// int nRet = 0;
#if NO
if (this.vdbs == null)
{
this.ActivateManagerThreadForLoad();
strError = "app.vdbs == null。故障原因请检查dp2Library日志";
return -1;
}
Debug.Assert(this.vdbs != null, "");
#endif
XmlDocument dom = new XmlDocument();
try
{
dom.LoadXml(strSourceQueryXml);
}
catch (Exception ex)
{
strError = "XML检索式装入XMLDOM时出错: " + ex.Message;
return -1;
}
// 遍历所有<target>元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//target");
for (int i = 0; i < nodes.Count; i++)
{
XmlNode node = nodes[i];
string strList = DomUtil.GetAttr(node, "list");
if (String.IsNullOrEmpty(strList) == true)
continue;
DbCollection dbs = new DbCollection();
dbs.Build(strList);
for (int j = 0; j < dbs.Count; j++)
{
Db db = dbs[j];
// 允许预约到书库 2015/6/14
if (db.DbName == this.ArrivedDbName)
continue;
string strBiblioDbName = "";
string strDbType = this.GetDbType(db.DbName,
out strBiblioDbName);
if (String.IsNullOrEmpty(strDbType) == true)
{
strError = "数据库 '" + db.DbName + "' 超出了读者可检索的数据库范围";
return 1;
}
}
}
return 0;
}
// 检查检索式内有没有超越当前用户管辖的读者库范围的读者库
// 注: 本函数并不检查检索式中出现的读者库以外的其它类型的数据库
// return:
// -1 error
// 0 没有超越要求
// 1 超越了要求
public int CheckReaderDbXmlQuery(string strSourceQueryXml,
string strLibraryCodeList,
out string strError)
{
strError = "";
// int nRet = 0;
#if NO
if (this.vdbs == null)
{
this.ActivateManagerThreadForLoad();
strError = "app.vdbs == null。故障原因请检查dp2Library日志";
return -1;
}
Debug.Assert(this.vdbs != null, "");
#endif
XmlDocument dom = new XmlDocument();
try
{
dom.LoadXml(strSourceQueryXml);
}
catch (Exception ex)
{
strError = "XML检索式装入XMLDOM时出错: " + ex.Message;
return -1;
}
// 遍历所有<target>元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//target");
for (int i = 0; i < nodes.Count; i++)
{
XmlNode node = nodes[i];
string strList = DomUtil.GetAttr(node, "list");
if (String.IsNullOrEmpty(strList) == true)
continue;
DbCollection dbs = new DbCollection();
dbs.Build(strList);
for (int j = 0; j < dbs.Count; j++)
{
Db db = dbs[j];
// 需要限制检索读者库为当前管辖的范围
{
string strLibraryCode = "";
bool bReaderDbInCirculation = true;
if (this.IsReaderDbName(db.DbName,
out bReaderDbInCirculation,
out strLibraryCode) == true)
{
// 检查当前操作者是否管辖这个读者库
// 观察一个读者记录路径,看看是不是在当前用户管辖的读者库范围内?
if (this.IsCurrentChangeableReaderPath(db.DbName + "/?",
strLibraryCodeList) == false)
{
strError = $"读者库 '{db.DbName}' 不在{GetCurrentUserName(null)}管辖范围内";
return 1;
}
}
}
}
}
return 0;
}
// 将包含虚拟库要求的XML检索式变换为内核能够理解的实在库XML检索式
// return:
// -1 error
// 0 没有发生变化
// 1 发生了变化
public int KernelizeXmlQuery(string strSourceQueryXml,
out string strTargetQueryXml,
out string strError)
{
strTargetQueryXml = "";
strError = "";
int nRet = 0;
Debug.Assert(this.vdbs != null, "");
XmlDocument dom = new XmlDocument();
try
{
dom.LoadXml(strSourceQueryXml);
}
catch (Exception ex)
{
strError = "XML检索式装入XMLDOM时出错: " + ex.Message;
return -1;
}
bool bChanged = false;
{
// 遍历所有<target>元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//target");
foreach (XmlElement node in nodes)
{
string strList = DomUtil.GetAttr(node, "list");
if (String.IsNullOrEmpty(strList) == true)
continue;
// 变换list参数值,将其中的虚拟库(连带途径)变换为物理库和途径
// parameters:
// return:
// -1 error
// 0 没有发生变化
// 1 发生了变化
nRet = ConvertList(strList,
out string strOutputList,
out strError);
if (nRet == -1)
return -1;
if (nRet == 0)
continue;
bChanged = true;
DomUtil.SetAttr(node, "list", strOutputList);
}
}
#if NO
{
// 遍历所有 item 元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//item");
foreach (XmlElement node in nodes)
{
// 找到最近一个祖先的 target@list
string strList = GetTargetList(node);
if (strList == null)
continue;
List<string> parts = StringUtil.ParseTwoPart(strList, ":");
string strDbName = parts[0];
string strFrom = parts[1];
// 只取第一个 from
nRet = strFrom.IndexOf(",");
if (nRet != -1)
strFrom = strFrom.Substring(0, nRet).Trim();
if (string.IsNullOrEmpty(strDbName) || string.IsNullOrEmpty(strFrom))
continue;
Debug.Assert(String.IsNullOrEmpty(strDbName) == false, "");
strError = EnsureKdbs(false);
if (strError != null)
{
strError = "EnsureKdbs() error";
return -1;
}
string strFromStyle = this.kdbs.GetFromStyles(strDbName, strFrom, "zh");
string strQueryWord = node.SelectSingleNode("word/text()")?.Value;
string strMatchStyle = node.SelectSingleNode("match/text()")?.Value;
string strDataType = node.SelectSingleNode("dataType/text()")?.Value;
string strRelation = node.SelectSingleNode("relation/text()")?.Value;
if (string.IsNullOrEmpty(strRelation))
strRelation = "=";
if (string.IsNullOrEmpty(strDataType))
strDataType = "string";
if (strQueryWord == null)
strQueryWord = "";
if (strFrom == "__id")
{
// 如果为范围式
if (String.IsNullOrEmpty(strQueryWord) == false // 2013/3/25
&& strQueryWord.IndexOfAny(new char[] { '-', '~' }) != -1)
{
strRelation = "range";
strDataType = "number";
// 2012/3/29
strMatchStyle = "exact";
}
else if (String.IsNullOrEmpty(strQueryWord) == false)
{
strDataType = "number";
// 2012/3/29
strMatchStyle = "exact";
}
bChanged = true;
}
// 2014/8/28
else if (StringUtil.IsInList("_time", strFromStyle) == true)
{
// 如果为范围式
if (strQueryWord.IndexOf("~") != -1)
{
strRelation = "range";
strDataType = "number";
}
else
{
strDataType = "number";
// 如果检索词为空,并且匹配方式为前方一致、中间一致、后方一致,那么认为这是意图要命中全部记录
// 注意:如果检索词为空,并且匹配方式为精确一致,则需要认为是获取空值,也就是不存在对应检索点的记录
if (strMatchStyle != "exact" && string.IsNullOrEmpty(strQueryWord) == true)
{
strMatchStyle = "exact";
strRelation = "range";
strQueryWord = "~";
}
}
// 最后统一修改为exact。不能在一开始修改,因为strMatchStyle值还有帮助判断的作用
strMatchStyle = "exact";
bChanged = true;
}
DomUtil.SetElementText(node, "match", strMatchStyle);
DomUtil.SetElementText(node, "word", strQueryWord);
DomUtil.SetElementText(node, "dataType", strDataType);
DomUtil.SetElementText(node, "relation", strRelation);
}
}
#endif
// 对 XML 检索式进行必要的变换。处理 range 和 time 检索细节
nRet = FilterXmlQuery(dom,
out strError);
if (nRet == -1)
return -1;
if (nRet == 1)
bChanged = true;
if (bChanged == false)
{
strTargetQueryXml = strSourceQueryXml;
return 0;
}
strTargetQueryXml = dom.OuterXml;
return 1;
}
// 对 XML 检索式进行必要的变换。处理 range 和 time 检索细节
public int FilterXmlQuery(XmlDocument dom,
out string strError)
{
strError = "";
int nRet = 0;
bool bChanged = false;
// 遍历所有 item 元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//item");
foreach (XmlElement item in nodes)
{
// 找到最近一个祖先的 target@list
string strList = GetTargetList(item);
if (strList == null)
continue;
// 2023/2/4
// list 中用分号分隔为一个一个段落,每个段落表示一个数据库的检索途径
string[] aDatabase = strList.Split(';');
// 2023/2/4
// 只取第一个分段
string first_segment = aDatabase[0];
List<string> parts = StringUtil.ParseTwoPart(first_segment, ":");
string strDbName = parts[0];
string strFrom = parts[1];
// 只取第一个 from
nRet = strFrom.IndexOf(",");
if (nRet != -1)
strFrom = strFrom.Substring(0, nRet).Trim();
if (string.IsNullOrEmpty(strDbName) || string.IsNullOrEmpty(strFrom))
continue;
Debug.Assert(String.IsNullOrEmpty(strDbName) == false, "");
strError = EnsureKdbs(false);
if (strError != null)
{
strError = "EnsureKdbs() error";
return -1;
}
string strFromStyle = this.kdbs.GetFromStyles(strDbName, strFrom, "zh");
string strQueryWord = item.SelectSingleNode("word/text()")?.Value;
string strMatchStyle = item.SelectSingleNode("match/text()")?.Value;
string strDataType = item.SelectSingleNode("dataType/text()")?.Value;
string strRelation = item.SelectSingleNode("relation/text()")?.Value;
if (string.IsNullOrEmpty(strRelation))
strRelation = "=";
if (string.IsNullOrEmpty(strDataType))
strDataType = "string";
if (strQueryWord == null)
strQueryWord = "";
if (strFrom == "__id")
{
// 如果为范围式
if (String.IsNullOrEmpty(strQueryWord) == false // 2013/3/25
&& strQueryWord.IndexOfAny(new char[] { '-', '~' }) != -1)
{
strRelation = "range";
strDataType = "number";
// 2012/3/29
strMatchStyle = "exact";
}
else if (String.IsNullOrEmpty(strQueryWord) == false)
{
strDataType = "number";
// 2012/3/29
strMatchStyle = "exact";
}
bChanged = true;
}
// 2014/8/28
else if (StringUtil.IsInList("_time", strFromStyle) == true)
{
// 如果为范围式
if (strQueryWord.IndexOf("~") != -1)
{
strRelation = "range";
strDataType = "number";
}
else
{
strDataType = "number";
// 如果检索词为空,并且匹配方式为前方一致、中间一致、后方一致,那么认为这是意图要命中全部记录
// 注意:如果检索词为空,并且匹配方式为精确一致,则需要认为是获取空值,也就是不存在对应检索点的记录
if (strMatchStyle != "exact" && string.IsNullOrEmpty(strQueryWord) == true)
{
strMatchStyle = "exact";
strRelation = "range";
strQueryWord = "~";
}
}
// 最后统一修改为exact。不能在一开始修改,因为strMatchStyle值还有帮助判断的作用
strMatchStyle = "exact";
bChanged = true;
}
DomUtil.SetElementText(item, "match", strMatchStyle);
DomUtil.SetElementText(item, "word", strQueryWord);
DomUtil.SetElementText(item, "dataType", strDataType);
DomUtil.SetElementText(item, "relation", strRelation);
}
if (bChanged == true)
return 1;
return 0;
}
static string GetTargetList(XmlElement current)
{
while (current != null)
{
if (current.Name == "target")
return current.GetAttribute("list");
current = current.ParentNode as XmlElement;
}
return null;
}
// 变换list参数值,将其中的虚拟库(连带途径)变换为物理库和途径
// parameters:
// return:
// -1 error
// 0 没有发生变化
// 1 发生了变化
int ConvertList(string strSourceList,
out string strTargetList,
out string strError)
{
strTargetList = "";
strError = "";
DbCollection dbs = new DbCollection();
dbs.Build(strSourceList);
bool bChanged = false;
DbCollection target_dbs = new DbCollection();
for (int i = 0; i < dbs.Count; i++)
{
Db db = dbs[i];
Debug.Assert(this.vdbs != null, "");
VirtualDatabase vdb = this.vdbs[db.DbName];
if (vdb == null) // 不是虚拟库
{
target_dbs.Add(db);
continue;
}
if (vdb.IsVirtual == false) // 不是虚拟库
{
target_dbs.Add(db);
continue;
}
bChanged = true;
// 一个Db对象可能演化为多个Db对象
List<Db> multi_dbs = new List<Db>();
// 获得下属的所有真实数据库名
List<string> real_dbnames = vdb.GetRealDbNames();
for (int j = 0; j < real_dbnames.Count; j++)
{
Db target_db = new Db();
target_db.DbName = real_dbnames[j];
List<string> real_froms = new List<string>();
for (int k = 0; k < db.Froms.Count; k++)
{
// 虚拟的路径名
string strVirtualFromName = db.Froms[k];
// 实在的路径名
string strRealFroms = vdb.GetRealFromName(
this.vdbs.db_dir_results,
target_db.DbName,
strVirtualFromName);
if (String.IsNullOrEmpty(strRealFroms) == true)
continue;
string[] froms = strRealFroms.Split(new char[] { ',' });
for (int l = 0; l < froms.Length; l++)
{
real_froms.Add(froms[l]);
}
}
if (real_froms.Count == 0)
continue;
target_db.Froms = real_froms;
multi_dbs.Add(target_db);
}
if (multi_dbs.Count == 0)
continue;
target_dbs.AddRange(multi_dbs);
}
if (bChanged == false)
{
strTargetList = strSourceList;
return 0;
}
strTargetList = target_dbs.GetString();
return 1;
}
// 检查一个 XML 检索式里面的数据库名是否超出当前账户的权限
// return:
// -1 检查过程出错
// 0 没有超出权限的情况
// 1 有超出权限的情况,报错信息在 strError 中
public int CheckSearchRights(
SessionInfo sessioninfo,
string strQueryXml,
out string strError)
{
strError = "";
XmlDocument dom = new XmlDocument();
try
{
dom.LoadXml(strQueryXml);
}
catch (Exception ex)
{
strError = "XML 检索式装入 XMLDOM 时出错: " + ex.Message;
return -1;
}
// 权限超出的数据库名列表
List<string> outof_list = new List<string>();
// 遍历所有 item 元素
XmlNodeList nodes = dom.DocumentElement.SelectNodes("//item");
foreach (XmlElement item in nodes)
{
// 找到最近一个祖先的 target@list
string strList = GetTargetList(item);
if (strList == null)
continue; // 注: 也可以选择返回 -1 报错,说检索式结构不正确
var dbnames = GetDbNames(strList);
foreach (var dbname in dbnames)
{
var error = HasSearchRight(sessioninfo, dbname);
if (error != null)
outof_list.Add(dbname + ":" + error);
}
}
if (outof_list.Count > 0)
{
strError = $"{SessionInfo.GetCurrentUserName(sessioninfo)}对下列数据库不具备检索权限:\r\n{StringUtil.MakePathList(outof_list, "\r\n")} ";
return 1;
}
return 0;
}
// 判断一个数据库名是否允许当前用户检索
string HasSearchRight(SessionInfo sessioninfo,
string strDbName)
{
string rights = sessioninfo.RightsOrigin;
var db_type = GetAllDbType(strDbName);
string right = "";
if (db_type == "biblio")
{
right = "searchbiblio";
}
else if (db_type == "reader")
{
var ret = (StringUtil.IsInList("searchreader", rights));
if (ret == false)
return $"不具备权限 searchreader";
{
// 检查当前操作者是否管辖这个读者库
// 观察一个读者记录路径,看看是不是在当前用户管辖的读者库范围内?
if (this.IsCurrentChangeableReaderPath(strDbName + "/?",
sessioninfo.ExpandLibraryCodeList) == false)
return $"读者库 '{strDbName}' 不在{GetCurrentUserName(sessioninfo)}管辖范围内";
}
return null;
}
else if (db_type == "order")
{
right = "searchorder";
}
else if (db_type == "issue")
{
right = "searchissue";
}
else if (db_type == "item")
{
right = "searchitem";
}
else if (db_type == "comment")
{
right = "searchcomment";
}
else if (db_type == "authority")
{
right = "searchauthority";
}
else if (db_type == "amerce")
{
right = "searchamerce";
}
else if (db_type == "inventory")
{
right = "searchinventory";
}
else if (db_type == "arrived")
{
right = "searcharrived";
}
else if (db_type == "publisher")
{
right = "searchpublisher";
}
else if (db_type == "zhongcihao")
{
right = "searchzhongcihao";
}
else if (db_type == "dictionary")
{
right = "searchdictionary";
}
else
return $"无法识别数据库 '{strDbName}' 的类型";
// 如果 right 中包含 getreaderinfo,则需要单独 if 一次
if (StringUtil.IsInList("getreaderinfo", right))
{
// 注意这里要获得原始的 getreaderinfo:,因为并不在意 file 元素的权限
var level = StringUtil.GetParameterByPrefix(rights, "getreaderinfo");
if (level != null)
return null;
}
if (StringUtil.IsInList(right, rights) == false)
return $"不具备权限 {right}";
return null;
}
// 从 targe@list 中剖析出所有库名
static List<string> GetDbNames(string strList)
{
List<string> results = new List<string>();
// 以 ; 号分成多个库
string[] aDatabase = strList.Split(';');
foreach (string strOneDatabase in aDatabase)
{
if (string.IsNullOrEmpty(strOneDatabase))
continue;
var parts = StringUtil.ParseTwoPart(strOneDatabase, ":");
string strDbName = parts[0];
if (string.IsNullOrEmpty(strDbName) == false)
results.Add(strDbName);
}
return results;
}
}
class DbCollection : List<Db>
{
public int Build(string strList)
{
string[] segments = strList.Split(new char[] { ';' });
for (int i = 0; i < segments.Length; i++)
{
string strSegment = segments[i].Trim();
if (String.IsNullOrEmpty(strSegment) == true)
continue;
// 解析出数据库名
string strDbName = "";
int nRet = strSegment.IndexOf(':');
if (nRet == -1)
{
strDbName = strSegment;
strSegment = "";
}
else
{
strDbName = strSegment.Substring(0, nRet).Trim();
strSegment = strSegment.Substring(nRet + 1).Trim();
}
Db db = new Db(strDbName, strSegment);
this.Add(db);
}
return 0;
}
public string GetString()
{
string strResult = "";
for (int i = 0; i < this.Count; i++)
{
Db db = this[i];
if (i != 0)
strResult += ";";
strResult += db.GetString();
}
return strResult;
}
}
class Db
{
public string DbName = "";
public List<string> Froms = new List<string>();
public Db()
{
}
public Db(string strDbName,
string strFromList)
{
this.DbName = strDbName;
if (String.IsNullOrEmpty(strFromList) == true)
return;
string[] froms = strFromList.Split(new char[] { ',' });
for (int i = 0; i < froms.Length; i++)
{
string strFrom = froms[i].Trim();
if (String.IsNullOrEmpty(strFrom) == true)
continue;
this.Froms.Add(strFrom);
}
}
public string GetString()
{
if (this.Froms.Count == 0)
return this.DbName;
string strFroms = "";
for (int i = 0; i < this.Froms.Count; i++)
{
if (i != 0)
strFroms += ",";
strFroms += this.Froms[i];
}
return this.DbName + ":" + strFroms;
}
}
}