コード例 #1
0
        private void PermissionForm_Load(object sender, System.EventArgs e)
        {
            permissions = permissionBusiness.GetAll();
            for (int i = 0; i < permissions.Rows.Count; i++)
            {
                checkedListPermission.Items.Add(permissions.Rows[i]["PermissionName"]);
            }

            var permission = userGroupBusiness.GetAll();

            gridControl1.DataSource = permission;
            if (permission.Rows.Count > 0)
            {
                gridView1.SelectRow(0);
            }
        }
コード例 #2
0
        private void UserManagerForm_Load(object sender, System.EventArgs e)
        {
            var users = userBusiness.GetAllWithUserGroupName();

            gridControl1.DataSource = users;

            var userGroupBusiness = new UserGroupBusiness();
            var lookup            = lookUpEditUerGroup.Properties;

            lookup.DataSource = userGroupBusiness.GetAll();
            lookup.Columns.Add(new LookUpColumnInfo("UserGroupID", "Mã"));
            lookup.Columns.Add(new LookUpColumnInfo("UserGroupName", "Tên loại người dùng"));
            lookup.DisplayMember = "UserGroupName";
            lookup.ValueMember   = "UserGroupID";
        }