ningshuxia
2025-03-31 36f1be9860b303afac93f93a15f0c62cba57c3c5
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
namespace PBS.WinFrmUI
{
    public partial class ShopPlaceInfoCtrl : DevExpress.XtraEditors.XtraUserControl, IPlaceInfo
    {
        public ShopPlaceInfoCtrl()
        {
            InitializeComponent();
        } 
 
        private PlaceShopParasInfoVmo _model = null;
 
        public void Set(string info)
        {
            _model = PlaceShopParasInfoVmo.ToModel(info);
            _model ??= new();
            this.txtAreaSquare.EditValue = _model.AreaSquare;
            this.cbBusinessType.EditValue = _model.BusinessType;
            this.txtFloor.EditValue = _model.Floor;
            this.cbNature.EditValue = _model.Nature;
            this.txtPropertyCompany.EditValue = _model.PropertyCompany;
            this.txtPropertyRight.EditValue = _model.PropertyRight;
        }
 
        public bool Verify()
        { 
            this.dxErrorProvider1.ClearErrors(); 
            return true;
        }
 
        public string Get()
        {
            if (!Verify())
            {
                return null;
            }
            _model.AreaSquare = string.IsNullOrEmpty(txtAreaSquare.Text) ? null : double.Parse(txtAreaSquare.Text);
            _model.BusinessType = cbBusinessType.Text;
            _model.Floor = string.IsNullOrEmpty(txtFloor.Text) ? 0 : int.Parse(txtFloor.Text);
            _model.Nature = cbNature.Text;
            _model.PropertyCompany = txtPropertyCompany.Text;
            _model.PropertyRight = string.IsNullOrEmpty(txtPropertyRight.Text) ? 0 : int.Parse(txtPropertyRight.Text);
 
            return _model.ToJson();
        }
          
 
         
 
     
    }
}