public static bool Delete(string table_name, string PK_name, string PK_value) { string sql = "DELETE FROM " + table_name + " WHERE " + PK_name + " = " + PK_value; if (AccessHelper.ExecuteSql(sql) > 0) { return(true); } else { return(false); } }
public static bool Update(string table_name, string PK_name, string PK_value, string field_name, string field_value) { string sql = "UPDATE " + table_name + " SET " + field_name + " = " + field_value + " WHERE " + PK_name + " = " + PK_value; if (AccessHelper.ExecuteSql(sql) > 0) { return(true); } else { return(false); } }
public static bool Add(string table_name, List <string> field_values) { string sql = "INSERT INTO " + table_name + ValuesListToString(field_values); int isChanged = AccessHelper.ExecuteSql(sql); if (isChanged > 0) { return(true); } else { return(false); } }