Exemplo n.º 1
0
        private async void FrmEmpower_Load(object sender, EventArgs e)
        {
            try
            {
                //绑定权限数据
                var data = await _api.GetAuthorities(false);

                Tl_Data.KeyFieldName    = "AuthorityNum";
                Tl_Data.ParentFieldName = "AuthorityParent";
                Tl_Data.DataSource      = data;

                //绑定管理员数据
                var admins = await _adminApi.GetAdmins(true);

                Gc_Admins.DataSource = admins;
            }
            catch (Exception exception)
            {
                XtraMessageBox.Show(exception.Message);
            }
        }