duheng
2024-11-19 ca5f300a7cef85d22b5e0f9d59d117c49f9909b3
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
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Yw.WinFrmUI;
 
namespace HStation.WinFrmUI.Auth
{
    public partial class ShowCorpRoleInfoCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public ShowCorpRoleInfoCtrl()
        {
            InitializeComponent();
        }
 
        List<Yw.Vmo.Role> _CorprationName = new List<Yw.Vmo.Role>();
        public void SetCorprationName(List<Yw.Vmo.Role> role)
        {
            _CorprationName.Clear();
            _CorprationName = role;
 
            listBoxControl.DataSource = _CorprationName;
            listBoxControl.DisplayMember = "CorpID";
        }
        public Yw.Vmo.Role GetCorprationName(out string error)
        {
            error = "";
            var currentVm = this.listBoxControl.GetCurrentViewModel(_CorprationName);
            if (currentVm == null)
            {
                error = "请选择数据行!";
                return null;
            }
            return currentVm;
        }
        class data
        {
        }
    }
}