public static bool MatchingOneColumn_OfTable(string tableName, string column, string value) { // Check Exist in Table // DataBaseControl.Load(dataTable, "SELECT * FROM " + tableName + " WHERE StrComp(" + column + ", '" + value + "', 0) = 0 ; "); if (dataTable.Rows.Count != 0) { return(true); } return(false); }
public static void Load() { DataBaseControl.Load(dataTable, "SELECT * FROM TopUpHistory " + " WHERE StrComp( PlayerID, '" + PlayerDataBaseControl.playerID + "', 0) = 0 ; "); PointCardIDs = new string[dataTable.Rows.Count]; TopUpDates = new string[dataTable.Rows.Count]; for (int i = 0; i < dataTable.Rows.Count; i++) { PointCardIDs[i] = dataTable.Rows[i]["PointCardID"].ToString(); TopUpDates[i] = dataTable.Rows[i]["TopUpDate"].ToString(); } }
public static void Load() { DataBaseControl.Load(dataTable, "SELECT * FROM ProblemReport "); problemReportIDs = new string[dataTable.Rows.Count]; titles = new string[dataTable.Rows.Count]; details = new string[dataTable.Rows.Count]; for (int i = 0; i < dataTable.Rows.Count; i++) { problemReportIDs[i] = dataTable.Rows[i]["ProblemReportID"].ToString(); titles[i] = dataTable.Rows[i]["Title"].ToString(); details[i] = dataTable.Rows[i]["Detail"].ToString(); } }
public static int Get_ProblemReportNum() { DataBaseControl.Load("SELECT * FROM System;"); return(int.Parse(DataBaseControl.dataTable.Rows[0]["ProblemReportNum"].ToString())); }