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
using ISupply.Model;
namespace ISupply.WinFrm.Main._UserControls
{
    public partial class SchoolWizardForm : DevExpress.XtraEditors.XtraUserControl
    {
        public SchoolWizardForm()
        {
            InitializeComponent();
        }
 
        public SchoolFormModel GetData()
        {
            var m = new SchoolFormModel()
            {
                Address = txtAddress.Text,
                Area = 1721426218814935040,
                City = 1721435432132153344,
                Dist = 1721435432132153344,
                Name = txtName.Text,
                SchoolType = cbSchoolType.Text,
                Level = cbLevel.Text,
            };
 
            return m;
        }
 
        public void SetData(SchoolFormModel model)
        {
            if (model == null) return;
            txtAddress.Text = model.Address;
 
            txtName.Text = model.Name.ToString();
            cbLevel.Text = model.Level;
            cbSchoolType.Text = model.SchoolType;
            cbArea.Text = "上海市";
            cbCity.Text = "上海市";
            cbDist.Text = "闵行区";
        }
    }
}