public void loadListArray() { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; try { sql.ToString(); } catch { sql = F_DangNhap.SQL_con_object as SQLConnect; nguoi = F_DangNhap.person_object as NguoiDung; } listBox_DanhSach.Items.Clear(); string s = "SELECT MaID,TenDangNhap,HoTen,Cap FROM Taikhoan"; mang_ID = sql.GetDataArray(s, 0); mang_TenDangNhap = sql.GetDataArray(s, 1); mang_TenNguoiDung = sql.GetDataArray(s, 2); mang_NhomQuanLy = sql.GetDataArray(s, 3); int i = 0; while (!string.IsNullOrEmpty(mang_TenDangNhap[i])) { listBox_DanhSach.Items.Add(i + ". " + mang_TenDangNhap[i]); i++; } Cursor = Cursors.Default; }