這個需求要增加兩個datagridview出現tag和列表編號不配對問題
pageCount = int .Parse(mResult[ 0 , 9 ].oContent.ToString());
int j = 0 ;
int z = 0 ;
// 顯示內容到列表
string [] rowInfo = new string [ 8 ];
try
... {
for (int i = 0; i < mResult.GetLength(0); i++)
...{
if (int.Parse(mResult[i, 8].oContent.ToString()) == 1)
...{
//行編號
rowInfo[0] = Convert.ToString(i + 1);
//姓名
rowInfo[1] = mResult[i, 5].oContent.ToString();
//所在部門
rowInfo[2] = mResult[i, 7].oContent.ToString();
//使用者名稱
rowInfo[3] = mResult[i, 1].oContent.ToString();
//MAC
//rowInfo[4] = mResult[i,3].oContent.ToString();
//使用時效
rowInfo[4] = mResult[i, 4].oContent.ToString();
//是否可用
rowInfo[5] = int.Parse(mResult[i, 8].oContent.ToString()) == 1 ? config.ReadConfigValue("MGM", "AL_Code_Yes") : config.ReadConfigValue("MGM", "AL_Code_No");
//線上狀態
rowInfo[6] = int.Parse(mResult[i, 10].oContent.ToString()) == 1 ? config.ReadConfigValue("MGM", "AL_Code_Online") : config.ReadConfigValue("MGM", "AL_Code_Offline");
//會員類型
rowInfo[7] = int.Parse(mResult[i, 11].oContent.ToString()) == 1 ? config.ReadConfigValue("MGM", "AL_Code_SysAdmin") : (int.Parse(mResult[i, 11].oContent.ToString()) == 2 ? config.ReadConfigValue("MGM", "AL_Code_DepartAdmin") : "");
ListViewItem mlistViewItem = new ListViewItem(rowInfo, -1);
listViewAcoount.Items.Add(mlistViewItem);
listViewAcoount.Items[j].Tag =mResult[i,0].oContent.ToString();
j++;
}
else
...{
//行編號
rowInfo[0] = Convert.ToString(i + 1);
//姓名
rowInfo[1] = mResult[i, 5].oContent.ToString();
//所在部門
rowInfo[2] = mResult[i, 7].oContent.ToString();
//使用者名稱
&n