using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; namespace iMonitorApp.Classes { // Token: 0x0200002A RID: 42 public class TOM { // Token: 0x060001B0 RID: 432 RVA: 0x0000D964 File Offset: 0x0000BB64 public static string GetUsersPerTheme(string themes) { List list = (from t in themes.Split(new char[] { ',' }).ToList() select t.Trim()).ToList(); string selectCommandText = "SELECT * from tblTeamOrganization2"; SqlConnection sqlConnection = new SqlConnection("server=10.153.64.3\\;Initial Catalog=infrastructure;User ID=dbuser;Password=dbuser;"); sqlConnection.Open(); DataTable dataTable = new DataTable(); SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectCommandText, sqlConnection); sqlDataAdapter.Fill(dataTable); sqlConnection.Close(); List list2 = new List(); foreach (string text in list) { bool flag = !dataTable.Columns.Contains(text); if (flag) { return ""; } foreach (object obj in dataTable.Rows) { DataRow dataRow = (DataRow)obj; bool flag2 = dataRow[text] != null && dataRow[text].ToString() != ""; if (flag2) { list2.Add(dataRow["user"].ToString() + "@4ecap.com"); } } } return string.Join(",", list2.Distinct().ToList()); } // Token: 0x060001B1 RID: 433 RVA: 0x0000DB10 File Offset: 0x0000BD10 public static List GetUsersPerThemeList(string themes) { List list = (from t in themes.Split(new char[] { ',' }).ToList() select t.Trim()).ToList(); string selectCommandText = "SELECT * from tblTeamOrganization2"; SqlConnection sqlConnection = new SqlConnection("server=10.153.64.3\\;Initial Catalog=infrastructure;User ID=dbuser;Password=dbuser;"); sqlConnection.Open(); DataTable dataTable = new DataTable(); SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectCommandText, sqlConnection); sqlDataAdapter.Fill(dataTable); sqlConnection.Close(); List list2 = new List(); foreach (string text in list) { bool flag = !dataTable.Columns.Contains(text); if (flag) { return new List(); } foreach (object obj in dataTable.Rows) { DataRow dataRow = (DataRow)obj; bool flag2 = dataRow[text] != null && dataRow[text].ToString() != ""; if (flag2) { list2.Add(dataRow["user"].ToString() + "@4ecap.com"); } } } return list2.Distinct().ToList(); } // Token: 0x060001B2 RID: 434 RVA: 0x0000DCB4 File Offset: 0x0000BEB4 public static string GetPhoneNumbersPerTheme(string themes) { List usersPerThemeList = TOM.GetUsersPerThemeList(themes); string selectCommandText = "SELECT * from tblContactDetails"; SqlConnection sqlConnection = new SqlConnection("server=10.153.64.3\\;Initial Catalog=infrastructure;User ID=dbuser;Password=dbuser;"); sqlConnection.Open(); DataTable dataTable = new DataTable(); SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectCommandText, sqlConnection); sqlDataAdapter.Fill(dataTable); sqlConnection.Close(); List list = new List(); foreach (object obj in dataTable.Rows) { DataRow dataRow = (DataRow)obj; bool flag = usersPerThemeList.Contains(dataRow["username"].ToString() + "@4ecap.com"); if (flag) { list.Add(dataRow["phonenumber"].ToString()); } } return string.Join(",", list.Distinct().ToList()); } } }