visual studio net 2005關於使用者列表增加停封與未停封帳號tag運用

來源:互聯網
上載者:User

這個需求要增加兩個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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.