duheng
2025-02-19 ad8f813f5eddd66740b4e09801e4ea02ddf70a4a
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
using static HStation.WinFrmUI.RoleViewModel;
 
namespace HStation.WinFrmUI
{
    /// <summary>
    ///详细信息
    /// </summary>
    public partial class ViewRoleDlg : DevExpress.XtraEditors.XtraForm
    {
        public ViewRoleDlg()
        {
            InitializeComponent();
        }
 
        private RoleViewModel _model = null;
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(RoleViewModel rhs)
        {
            _model = rhs;
            InitialUI(_model);
        }
 
        //初始化界面
        private void InitialUI(RoleViewModel model)
        {
            this.NameTextEdit.EditValue = _model.Name;
            this.TxtEditCode.EditValue = _model.Code;
            this.DescriptionMemoEdit.EditValue = _model.Description;
        }
    }
}