-
Notifications
You must be signed in to change notification settings - Fork 0
/
SysData.cs
2021 lines (1842 loc) · 69.5 KB
/
SysData.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
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using System.Collections;
using System.Data.OleDb;
using CUST;
using System.Xml;
using CUST.Tools;
namespace CUST.Sys
{
internal struct ZdType
{
public const string BKLBDM = "bklbdm";//报考类别
public const string KSLB = "kslbdm";//考生类别代码
public const string KSTZBZ = "kstzbz";//考生特征标志
public const string MZ = "mzdm";//民族代码
public const string MZWZ = "mzwzdm";//民族文字
public const string WYYZ = "wyyzdm";//外语语种代码
public const string XB = "xbdm";//性别代码
public const string ZZMM = "zzmmdm";//政治面貌代码
public const string ZJLXDM = "zjlxdm";
public const string KSTZ = "kstzbz";//考生特征
public const string TYXKKM = "tyxkkm3";//体育选考科目
public const string CZFS = "czfsdm"; //操作方式 金温展
public const string RZLB = "rzlbdm"; //日志类别 金温展
public const string MQLX = "mqlx";//母亲类型
public const string FQLX = "fqlx";//父亲类型
public const string ZW = "zw";//职位
public const string KQZW = "kqzw";//考区职位
}
public struct Struct_ZYMC
{
public string dm;//代码
public string mc;//名称
public Struct_ZYMC(string dm, string mc)
{
this.dm = dm;
this.mc = mc;
}
}
public struct Struct_ZYZD
{
public string zd;
public string mc;
public bool sfdk;
public Struct_ZYZD(string zd1, string mc1, bool sfdk1)
{
zd1 = "";
zd = zd1;
mc1 = "";
mc = mc1;
sfdk1 = false;
sfdk = sfdk1;
}
}
/// <summary>
/// 字典结构体.
/// </summary>
public struct Struct_ZD
{
/// <summary>
/// 字典码.
/// </summary>
public string zdm;
/// <summary>
/// 编码.
/// </summary>
public string bm;
/// <summary>
/// 名称.
/// </summary>
public string mc;
/// <summary>
/// 描述.
/// </summary>
public string ms;
///// <summary>
/////
///// </summary>
//public string gbkl;
}
/// <summary>
/// 照顾代码结构体.
/// </summary>
public struct Struct_ZGDM
{
/// <summary>
/// 照顾代码.
/// </summary>
public string zgdm;
/// <summary>
/// 照顾名称.
/// </summary>
public string zgmc;
/// <summary>
/// 分值.
/// </summary>
public int fz;
}
public class SysData
{
#region 数据库字典
//普校字典
private static DataTable InitZDData(string zdm)
{
lock (typeof(SysData))
{
DBClass dbc = new DBClass();
try
{
OracleParameter[] opara ={
new OracleParameter("p_zdm",OracleType.VarChar),
new OracleParameter("p_mycur",OracleType.Cursor)
};
opara[0].Value = zdm;
opara[1].Direction = ParameterDirection.Output;
DataSet ds = dbc.RunProcedure("PACK_SYS.Sys_ZD_selectByZDM", opara, "table");
return ds.Tables[0];
}
finally
{
dbc.Close();
}
}
}
/// <summary>
/// 从静态表转化为哈希表.
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
private static Hashtable FromZDDataTableToHashTable(DataTable dt)
{
lock (typeof(SysData))
{
Hashtable ht = new Hashtable();
Struct_ZD zd;
string bm;
foreach (DataRow dr in dt.Rows)
{
bm = dr["BM"].ToString();
//字典码.
zd.zdm = dr["ZDM"].ToString();
//编码.
zd.bm = dr["BM"].ToString();
//描述.
zd.mc = dr["MC"].ToString();
zd.ms = dr["MS"].ToString();
ht.Add(bm, zd);
}
return ht;
}
}
//mqlx .
private static DataTable dt_mqlx = InitZDData(ZdType.MQLX);
public static DataTable mqlx()
{
return dt_mqlx;
}
private static Hashtable ht_mqlx = FromZDDataTableToHashTable(dt_mqlx);
public static Struct_ZD mqlxByKey(string key) //根据键值,返回一个结构
{
object obj = ht_mqlx[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//fqlx .
private static DataTable dt_fqlx = InitZDData(ZdType.FQLX);
public static DataTable fqlx()
{
return dt_fqlx;
}
private static Hashtable ht_fqlx = FromZDDataTableToHashTable(dt_fqlx);
public static Struct_ZD fqlxByKey(string key) //根据键值,返回一个结构
{
object obj = ht_fqlx[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//czfsdm 金温展
private static DataTable dt_czfs = InitZDData(ZdType.CZFS);
public static DataTable CZFS()
{
return dt_czfs;
}
private static Hashtable ht_czfs = FromZDDataTableToHashTable(dt_czfs);
public static Struct_ZD CZFSByKey(string key) //根据键值,返回一个结构
{
object obj = ht_czfs[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//rzlbdm 金温展
private static DataTable dt_rzlb = InitZDData(ZdType.RZLB);
public static DataTable RZLB()
{
return dt_rzlb;
}
private static Hashtable ht_rzlb = FromZDDataTableToHashTable(dt_rzlb);
public static Struct_ZD RZLBByKey(string key) //根据键值,返回一个结构
{
object obj = ht_rzlb[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//tyxkkm .
private static DataTable dt_tyxkkm = InitZDData(ZdType.TYXKKM);
public static DataTable TYXKKM()
{
return dt_tyxkkm;
}
private static Hashtable ht_tyxkkm = FromZDDataTableToHashTable(dt_tyxkkm);
public static Struct_ZD TYXKKMByKey(string key) //根据键值,返回一个结构
{
object obj = ht_tyxkkm[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//ZJLXDM
private static DataTable dt_zjlxdm = InitZDData(ZdType.ZJLXDM);
public static DataTable ZJLXDM()
{
return dt_zjlxdm;
}
private static Hashtable ht_zjlxdm = FromZDDataTableToHashTable(dt_zjlxdm);
public static Struct_ZD ZJLXDMByKey(string key) //根据键值,返回一个结构
{
object obj = ht_zjlxdm[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//bklbdm
private static DataTable dt_bklbdm = InitZDData(ZdType.BKLBDM);
public static DataTable BKLBDM()
{
return dt_bklbdm;
}
private static Hashtable ht_bklbdm = FromZDDataTableToHashTable(dt_bklbdm);
public static Struct_ZD BKLBDMByKey(string key) //根据键值,返回一个结构
{
object obj = ht_bklbdm[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//kslbdm .
private static DataTable dt_kslb = InitZDData(ZdType.KSLB);
public static DataTable KSLB()
{
return dt_kslb;
}
private static Hashtable ht_kslb = FromZDDataTableToHashTable(dt_kslb);
public static Struct_ZD KSLBByKey(string key) //根据键值,返回一个结构
{
object obj = ht_kslb[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//kstzbz .
private static DataTable dt_kstzbz = InitZDData(ZdType.KSTZBZ);
public static DataTable KSTZBZ()
{
return dt_kstzbz;
}
private static Hashtable ht_kstzbz = FromZDDataTableToHashTable(dt_kstzbz);
public static Struct_ZD KSTZBZByKey(string key) //根据键值,返回一个结构
{
//object obj = ht_kstzbz[key];
//Struct_ZD struct_ZD = new Struct_ZD();
//struct_ZD.bm = key;
//return (obj != null ? (Struct_ZD)obj : struct_ZD);
Struct_ZD struct_ZD = new Struct_ZD();
if (key != "")
{
string kstz_jg = "";
string kstz_zj = "";
for (int j = 0; j < key.Length; j = j + 2)
{
kstz_zj = key.Substring(j, 2);
if (j == 0)
{
kstz_jg = ((Struct_ZD)ht_kstzbz[kstz_zj]).mc;
}
else
{
kstz_jg = kstz_jg + "+" + ((Struct_ZD)ht_kstzbz[kstz_zj]).mc;
}
}
struct_ZD.mc = kstz_jg;
struct_ZD.bm = key;
}
else
{
struct_ZD.mc = "";
struct_ZD.bm = "";
}
return struct_ZD;
}
//mzdm .
private static DataTable dt_mz = InitZDData(ZdType.MZ);
public static DataTable MZ()
{
return dt_mz;
}
private static Hashtable ht_mz = FromZDDataTableToHashTable(dt_mz);
public static Struct_ZD MZByKey(string key) //根据键值,返回一个结构
{
object obj = ht_mz[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//mzwzdm .
private static DataTable dt_mzwz = InitZDData(ZdType.MZWZ);
public static DataTable MZWZ()
{
return dt_mzwz;
}
private static Hashtable ht_mzwz = FromZDDataTableToHashTable(dt_mzwz);
public static Struct_ZD MZWZByKey(string key) //根据键值,返回一个结构
{
object obj = ht_mzwz[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//wyyzdm .
private static DataTable dt_wyyz = InitZDData(ZdType.WYYZ);
public static DataTable WYYZ()
{
return dt_wyyz;
}
private static Hashtable ht_wyyz = FromZDDataTableToHashTable(dt_wyyz);
public static Struct_ZD WYYZByKey(string key) //根据键值,返回一个结构
{
object obj = ht_wyyz[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//xbdm .
private static DataTable dt_xb = InitZDData(ZdType.XB);
public static DataTable XB()
{
return dt_xb;
}
private static Hashtable ht_xb = FromZDDataTableToHashTable(dt_xb);
public static Struct_ZD XBByKey(string key) //根据键值,返回一个结构
{
object obj = ht_xb[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
//zzmmdm .
private static DataTable dt_zzmm = InitZDData(ZdType.ZZMM);
public static DataTable ZZMM()
{
return dt_zzmm;
}
private static Hashtable ht_zzmm = FromZDDataTableToHashTable(dt_zzmm);
public static Struct_ZD ZZMMByKey(string key) //根据键值,返回一个结构
{
object obj = ht_zzmm[key];
Struct_ZD struct_ZD = new Struct_ZD();
struct_ZD.bm = key;
return (obj != null ? (Struct_ZD)obj : struct_ZD);
}
#endregion
#region 各种状态
private static DataTable FromHashTableToDataTable(Hashtable ht)//从哈希表转化为静态表
{
lock (typeof(SysData))
{
if (ht == null) return null;
DataTable dt = new DataTable();
dt.Columns.Add("bm", typeof(int));
dt.Columns.Add("mc", typeof(string));
DataRow dr;
foreach (DictionaryEntry de in ht)
{
dr = dt.NewRow();
dr["bm"] = de.Key;
dr["mc"] = de.Value;
dt.Rows.Add(dr);
}
dt.DefaultView.Sort = "bm asc";
return dt.DefaultView.ToTable();
}
}
private static DataTable FromHashTableToDataTableByDMstr(Hashtable ht)//从哈希表转化为静态表
{
lock (typeof(SysData))
{
if (ht == null) return null;
DataTable dt = new DataTable();
dt.Columns.Add("bm", typeof(string));
dt.Columns.Add("mc", typeof(string));
DataRow dr;
foreach (DictionaryEntry de in ht)
{
dr = dt.NewRow();
dr["bm"] = de.Key;
dr["mc"] = de.Value;
dt.Rows.Add(dr);
}
return dt;
}
}
#region======考生报名状态=====
private static Hashtable InitHKSBMZT()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add(0, "考生未保存");
student.Add(1, "考生保存");
student.Add(2, "考生提交");
student.Add(3, "学校提交");
student.Add(4, "县区提交");
student.Add(5, "地区提交");
return student;
}
}
private static Hashtable ht_ksbmzt = InitHKSBMZT();
public static string KSBMZTByKey(int key)
{
object obj = ht_ksbmzt[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_ksbmzt = FromHashTableToDataTable(ht_ksbmzt);
public static DataTable KSBMZT()
{
return dt_ksbmzt;
}
#endregion
#region======报名序号生成状态=========
private static Hashtable InitBMXHSCZT()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add(0, "未生成");
student.Add(1, "正在等待生成");
student.Add(2, "已生成");
student.Add(3, "生成失败");
return student;
}
}
private static Hashtable ht_bmxhsczt = InitBMXHSCZT();
public static string BMXHSCZTByKey(int key)
{
object obj = ht_bmxhsczt[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_bmxhsczt = FromHashTableToDataTable(ht_bmxhsczt);
public static DataTable BMXHSCZT()
{
return dt_bmxhsczt;
}
#endregion
#endregion
#region 字典重新绑值.
public static void ReSetZdData()
{
//考生类别代码.
ReSetKSLB();
//考生特征标志.
ReSetKSTZBZ();
//民族代码.
ReSetMZ();
//民族文字
ReSetMZWZ();
//外语语种代码
ReSetWYYZ();
//性别代码.
ReSetXB();
//政治面貌代码.
ReSetZZMM();
}
//考生类别代码.
public static void ReSetKSLB()
{
dt_kslb = InitZDData(ZdType.KSLB);
ht_kslb = FromZDDataTableToHashTable(dt_kslb);
}
//考生特征标志.
public static void ReSetKSTZBZ()
{
dt_kstzbz = InitZDData(ZdType.KSTZBZ);
ht_kstzbz = FromZDDataTableToHashTable(dt_kstzbz);
}
//民族代码.
public static void ReSetMZ()
{
dt_mz = InitZDData(ZdType.MZ);
ht_mz = FromZDDataTableToHashTable(dt_mz);
}
//民族文字
public static void ReSetMZWZ()
{
dt_mzwz = InitZDData(ZdType.MZWZ);
ht_mzwz = FromZDDataTableToHashTable(dt_mzwz);
}
//外语语种代码
public static void ReSetWYYZ()
{
dt_wyyz = InitZDData(ZdType.WYYZ);
ht_wyyz = FromZDDataTableToHashTable(dt_wyyz);
}
//性别代码.
public static void ReSetXB()
{
dt_xb = InitZDData(ZdType.XB);
ht_xb = FromZDDataTableToHashTable(dt_xb);
}
//政治面貌代码.
public static void ReSetZZMM()
{
dt_zzmm = InitZDData(ZdType.ZZMM);
ht_zzmm = FromZDDataTableToHashTable(dt_zzmm);
}
#endregion
#region======科目、字典码============
private static Hashtable InitZDM()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add("tyxkkm1", "体育科目一");
student.Add("tyxkkm2", "体育科目二");
student.Add("tyxkkm3", "体育科目三");
student.Add("bylbdm", "毕业类别");
student.Add("kslbdm", "考生类别代码");
student.Add("kstzbz", "考生特征标志");
student.Add("mzdm", "民族代码");
student.Add("mzwzdm", "民族文字");
student.Add("wyyzdm", "外语语种代码");
student.Add("xbdm", "性别代码");
student.Add("zzmmdm", "政治面貌代码");
student.Add("czfsdm", "操作方式代码");
student.Add("tyxkkm", "体育学考科目");
student.Add("zhlbdm", "帐号类别代码");
student.Add("zjlxdm", "证件类型代码");
student.Add("bkkldm", "报考科类代码");
student.Add("bklbdm", "报考类别代码");
student.Add("fqlx", "监护人1代码");
student.Add("mqlx", "监护人2代码");
student.Add("rzlbdm", "日志类别代码");
return student;
}
}
private static Hashtable ht_zdm = InitZDM();
public static string ZDMByKey(string key)
{
object obj = ht_zdm[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_zdm = FromHashTableToDataTableByDMstr(ht_zdm);
public static DataTable ZDM()
{
return dt_zdm;
}
#endregion
#region======考生种类(普校、对口)============
private static Hashtable InitKSZL()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add("1", "普校");
student.Add("2", "对口");
return student;
}
}
private static Hashtable ht_kszl = InitKSZL();
public static string KSZLByKey(string key)
{
object obj = ht_kszl[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_kszl = FromHashTableToDataTableByDMstr(ht_kszl);
public static DataTable KSZL()
{
return dt_kszl;
}
#endregion
#region======日志类型、操作类型、操作来源(2013-11-09)===========
//日志类型 rzlx(1考生报名,2考生体检,3照顾加分,4信息变更申请)
//修改人:王永川
//修改时间:2014-11-3
private static Hashtable InitRZLX()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add("1", "考生报名");
student.Add("2", "考生体检");
student.Add("3", "照顾加分");
student.Add("4", "信息变更申请");
student.Add("5", "外语口试成绩");
student.Add("6", "贫困生审核");
student.Add("7", "恢复删除考生");
return student;
}
}
private static Hashtable ht_rzlx = InitRZLX();
public static string RZLXByKey(string key)
{
object obj = ht_rzlx[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_rzlx = FromHashTableToDataTableByDMstr(ht_rzlx);
public static DataTable RZLX()
{
return dt_rzlx;
}
//操作类型 czlx(操作:1、添加、2修改、4驳回)
private static Hashtable InitCZLX()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add("1", "添加");
student.Add("2", "修改");
student.Add("4", "驳回");
//添加时间2014-8-27
student.Add("3", "删除");
student.Add("5", "提交");
student.Add("6", "同意变更");
student.Add("7", "拒绝変更");
student.Add("8", "导入");
student.Add("9", "同意");
student.Add("10", "未同意");
return student;
}
}
private static Hashtable ht_czlx = InitCZLX();
public static string CZLXByKey(string key)
{
object obj = ht_czlx[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_czlx = FromHashTableToDataTableByDMstr(ht_czlx);
public static DataTable CZLX()
{
return dt_czlx;
}
/*//操作来源 czly(操作来源:1信息变更申请,2修改,3驳回)
private static Hashtable InitCZLY()
{
lock (typeof(SysData))
{
Hashtable student = new Hashtable();
student.Add("1", "信息变更申请");
student.Add("2", "修改");
student.Add("3", "驳回");
return student;
}
}
private static Hashtable ht_czly = InitCZLY();
public static string CZLYByKey(string key)
{
object obj = ht_czly[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_czly = FromHashTableToDataTableByDMstr(ht_czly);
public static DataTable CZLY()
{
return dt_czly;
}*/
#endregion
#region======考场科目(2013-11-09)============
private static Hashtable InitKCKM()
{
lock (typeof(SysData))
{
Hashtable kckm = new Hashtable();
kckm.Add("0", "高考");
kckm.Add("1", "美术类");
kckm.Add("2", "MHK");
return kckm;
}
}
private static Hashtable ht_kckm = InitKCKM();
public static string KCKMByKey(string key)
{
object obj = ht_kckm[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_kckm = FromHashTableToDataTableByDMstr(ht_kckm);
public static DataTable KCKM()
{
return dt_kckm;
}
#endregion
#region======考生号生成状态(2013-11-30)============
private static Hashtable InitKSHZT()
{
lock (typeof(SysData))
{
Hashtable kckm = new Hashtable();
kckm.Add("0", "等待生成");
kckm.Add("2", "正在生成");
return kckm;
}
}
private static Hashtable ht_kshzt = InitKSHZT();
public static string KSHZTByKey(string key)
{
object obj = ht_kshzt[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_kshzt = FromHashTableToDataTableByDMstr(ht_kshzt);
public static DataTable KSHZT()
{
return dt_kshzt;
}
#endregion
#region======方案类型(2014-1-14)============
private static Hashtable InitFALX()
{
lock (typeof(SysData))
{
Hashtable falx = new Hashtable();
falx.Add("0", "高考(普校)");
falx.Add("3", "高考(对口)");
falx.Add("1", "美术类");
falx.Add("2", "MHK");
falx.Add("4", "运动训练");
return falx;
}
}
private static Hashtable ht_falx = InitFALX();
public static string FALXByKey(string key)
{
object obj = ht_falx[key];
return (obj != null ? (string)obj : key.ToString());
}
// 这个函数是对“方案”进行定制的,主要是为了改变“对口”的显示顺序,将其和“普校”放到一起
private static DataTable FromHashTableToFATable(Hashtable htFalx)
{
DataTable dtTemp = FromHashTableToDataTableByDMstr(ht_falx);
dtTemp.AcceptChanges();
DataRow drTemp = dtTemp.Select("bm=3")[0];
DataRow drNew = dtTemp.NewRow();
drNew["bm"] = drTemp["bm"];
drNew["mc"] = drTemp["mc"];
dtTemp.Rows.Remove(drTemp);
dtTemp.Rows.InsertAt(drNew, 1);
dtTemp.AcceptChanges();
return dtTemp;
}
private static DataTable dt_falx = FromHashTableToFATable(ht_falx);
public static DataTable FALX()
{
return dt_falx;
}
#endregion
#region======操作人类别(2014年2月15日)=========
private static Hashtable InitYHLB()
{
lock (typeof(SysData))
{
Hashtable yh = new Hashtable();
yh.Add(1, "市区");
yh.Add(2, "县区");
yh.Add(3, "学校");
yh.Add(5, "高中");
yh.Add(6, "中职");
yh.Add(7, "中教科");
yh.Add(8, "市级部门");
return yh;
}
}
private static Hashtable ht_yhlb = InitYHLB();
public static string YHLBByKey(int key)
{
object obj = ht_yhlb[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_yhlb = FromHashTableToDataTable(ht_yhlb);
public static DataTable YHLB()
{
return dt_yhlb;
}
#endregion
#region 考场科目顺序
private static Hashtable InitKMShunXu()
{
lock (typeof(SysData))
{
Hashtable kmsx = new Hashtable();
//kmsx.Add(1, "第一天上午第一场");
//kmsx.Add(2, "第一天上午第二场");
//kmsx.Add(3, "第一天上午第三场");
//kmsx.Add(4, "第一天下午第一场");
//kmsx.Add(5, "第一天下午第二场");
//kmsx.Add(6, "第一天下午第三场");
//kmsx.Add(7, "第二天上午第一场");
//kmsx.Add(8, "第二天上午第二场");
//kmsx.Add(9, "第二天上午第三场");
//kmsx.Add(10, "第二天下午第一场");
//kmsx.Add(11, "第二天下午第二场");
//kmsx.Add(12, "第二天下午第三场");
//kmsx.Add(13, "第三天上午第一场");
//kmsx.Add(14, "第三天上午第二场");
//kmsx.Add(15, "第三天上午第三场");
//kmsx.Add(16, "第三天下午第一场");
//kmsx.Add(17, "第三天下午第二场");
//kmsx.Add(18, "第三天下午第三场");
kmsx.Add(11, "第一天上午第一场");
kmsx.Add(12, "第一天上午第二场");
kmsx.Add(13, "第一天上午第三场");
kmsx.Add(14, "第一天下午第一场");
kmsx.Add(15, "第一天下午第二场");
kmsx.Add(16, "第一天下午第三场");
kmsx.Add(21, "第二天上午第一场");
kmsx.Add(22, "第二天上午第二场");
kmsx.Add(23, "第二天上午第三场");
kmsx.Add(24, "第二天下午第一场");
kmsx.Add(25, "第二天下午第二场");
kmsx.Add(26, "第二天下午第三场");
kmsx.Add(31, "第三天上午第一场");
kmsx.Add(32, "第三天上午第二场");
kmsx.Add(33, "第三天上午第三场");
kmsx.Add(34, "第三天下午第一场");
kmsx.Add(35, "第三天下午第二场");
kmsx.Add(36, "第三天下午第三场");
return kmsx;
}
}
private static Hashtable ht_kmsx = InitKMShunXu();
public static string KMShunXuByKey(int key)
{
object obj = ht_kmsx[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_kmsx = FromHashTableToDataTable(ht_kmsx);
public static DataTable KMShunXu()
{
return dt_kmsx;
}
#endregion
#region======图像采集(2014年8月2日)=========
private static Hashtable InitTXCJ()
{
lock (typeof(SysData))
{
Hashtable txcj = new Hashtable();
txcj.Add(0, "未采集");
txcj.Add(1, "已采集");
return txcj;
}
}
private static Hashtable ht_txcj = InitTXCJ();
public static string TXCJByKey(int key)
{
object obj = ht_txcj[key];
return (obj != null ? (string)obj : key.ToString());
}
private static DataTable dt_txcj = FromHashTableToDataTable(ht_txcj);
public static DataTable TXCJZT()
{