ningshuxia
2025-03-28 ce9752fd657c6689ea64929eb962146e2730624e
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
namespace PBS.WinFrmUI
{
    public partial class SchoolPlaceInfoCtrl : DevExpress.XtraEditors.XtraUserControl, IPlaceInfo
    {
        public SchoolPlaceInfoCtrl()
        {
            InitializeComponent();
        }
 
 
        private PlaceSchoolParasInfoVmo _model = null;
 
        public void Set(string info)
        {
            _model = PlaceSchoolParasInfoVmo.ToModel(info);
            _model ??= new();
 
            this.cbSchoolType.EditValue = _model.SchoolType;
            this.cbLevel.EditValue = _model.Level;
 
        }
 
        public bool Verify()
        { 
            this.dxErrorProvider1.ClearErrors(); 
            return true;
        }
 
        public string Get()
        {
            if (!Verify())
            {
                return null;
            }
 
            _model.SchoolType = this.cbSchoolType.Text;
            _model.Level = this.cbLevel.Text;
 
            return _model.ToJson();
        }
 
      
    }
}