duheng
2024-04-15 154d4c352b9ab06a925451f1fdcea6afd1701e10
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
using ISupply.Model;
namespace ISupply.WinFrm.Main._UserControls
{
    public partial class ShopWizardForm : DevExpress.XtraEditors.XtraUserControl
    {
        public ShopWizardForm()
        {
            InitializeComponent();
        }
 
        public ShopFormModel GetData()
        {
            var m = new ShopFormModel()
            {
                Address = txtAddress.Text,
                Area = 1721426218814935040,
                City = 1721435432132153344,
                Dist = 1721435432132153344,
                Name = txtName.Text,
                AreaSquare = string.IsNullOrEmpty(txtAreaSquare.Text) ? decimal.Zero : decimal.Parse(txtAreaSquare.Text),
                BusinessType = cbBusinessType.Text,
                Floor = string.IsNullOrEmpty(txtFloor.Text) ? 0 : int.Parse(txtFloor.Text),
                Nature = cbNature.Text,
                PropertyCompany = txtPropertyCompany.Text,
                PropertyRight = string.IsNullOrEmpty(txtPropertyRight.Text) ? 0 : int.Parse(txtPropertyRight.Text),
            };
 
            return m;
        }
 
        public void SetData(ShopFormModel model)
        {
            if (model == null) return;
            txtAddress.Text = model.Address;
            txtName.Text = model.Name.ToString();
            cbArea.Text = "上海市";
            cbCity.Text = "上海市";
            cbDist.Text = "闵行区";
            txtAreaSquare.Text = model.AreaSquare.ToString();
            cbBusinessType.Text = model.BusinessType.ToString();
            txtFloor.Text = model.Floor.ToString();
            cbNature.Text = model.Nature.ToString();
            txtPropertyCompany.Text = model.PropertyCompany.ToString();
            txtPropertyRight.Text = model.PropertyRight.ToString();
        }
    }
}