protected void getAllUsers() { DataTable myDataTable = new DataTable(); AdminModule myAdminModule = new AdminModule(); myDataTable = myAdminModule.getAllUsers2().Copy(); myDataTable.Columns.Add("Warn", typeof(String)); myDataTable.Columns.Add("Ban", typeof(String)); UsersGridView.DataSource = myDataTable; UsersGridView.DataBind(); formatGridView(); }
protected void search() { DataTable myDataTable = new DataTable(); AdminModule myAdminModule = new AdminModule(); //myDataTable = myAdminModule.getAllUsers(); if (KeywordBox.Text.Equals("")) { myDataTable = myAdminModule.getAllUsers2().Copy(); } else { myDataTable = myAdminModule.searchUsers2(KeywordBox.Text).Copy(); } myDataTable.Columns.Add("Warn", typeof(String)); myDataTable.Columns.Add("Ban", typeof(String)); UsersGridView.DataSource = myDataTable; UsersGridView.DataBind(); formatGridView(); }