Browse Source

Merge branch 'master' of http://10.2.1.24:10244/xxe/HKCard

Lishi
xxe 2 years ago
parent
commit
74ae94716b
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      HKCardManager/UserPages/PersonnelEntryPage.cs

+ 8
- 4
HKCardManager/UserPages/PersonnelEntryPage.cs View File

@@ -49,7 +49,8 @@ namespace HKCardManager.UserPages
{
var res = HKLibHelper.GetUserList("");
Global.UserListDtos.Clear();
Global.PagUserListDtos.Clear();
var userinfo = new List<UserInfoModel>();
//Global.PagUserListDtos.Clear();
res?.ToList()?.ForEach(item =>
{
string status = "";
@@ -71,15 +72,18 @@ namespace HKCardManager.UserPages

for (int i = (currentPageIndex - 1) * pageSize; i < Global.UserListDtos.Count; i++)
{
if (Global.PagUserListDtos.Count < pageSize)
Global.PagUserListDtos.Add(Global.UserListDtos.ElementAt(i));
if (userinfo.Count < pageSize)
userinfo.Add(Global.UserListDtos.ElementAt(i));
else
break;
}

this.Invoke(() =>
{
dataGridView1.DataSource = null; dataGridView1.DataSource = Global.PagUserListDtos;
dataGridView1.DataSource = null;
Global.PagUserListDtos.Clear();
Global.PagUserListDtos = userinfo;
dataGridView1.DataSource = Global.PagUserListDtos;
totalCount = Global.UserListDtos.Count;
comboBoxNum();
showDataGirdView();


Loading…
Cancel
Save