示例#1
0
        public static int DeleteByColumnValues(string tableName, string databaseName, List <string> columnNames, List <string> columnValues)
        {
            BaseData  bd    = new BaseData(databaseName);
            TableData table = bd.GetTable(tableName);

            return(table.DeleteByColumnValues(columnNames, columnValues));
        }
示例#2
0
        public static int DeleteAll(string tableName, string databaseName)
        {
            BaseData  bd    = new BaseData(databaseName);
            TableData table = bd.GetTable(tableName);

            return(table.DeleteAll());
        }
示例#3
0
        public static int InsertInto(string tableName, string databaseName, List <string> values, List <string> columns = null)
        {
            BaseData  bd    = new BaseData(databaseName);
            TableData table = bd.GetTable(tableName);

            return(table.Insert(values, columns));
        }
示例#4
0
        public static int Update(string tableName, string databaseName, List <string> columnNames, List <string> columnOldValues, List <string> columnNewValues)
        {
            int       count = 0;
            BaseData  bd    = new BaseData(databaseName);
            TableData table = bd.GetTable(tableName);

            for (int i = 0; i < columnNames.Count; i++)
            {
                count += table.UpdateValue(columnNames[i], columnOldValues[i], columnNewValues[i]);
            }
            return(count);
        }
 public static int Update(string tableName, string databaseName, List<string> columnNames, List<string> columnOldValues, List<string> columnNewValues)
 {
     int count = 0;
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     for(int i = 0; i < columnNames.Count; i++)
     {
        count += table.UpdateValue(columnNames[i], columnOldValues[i], columnNewValues[i]);
     }
     return count;
 }
 public static int DeleteByColumnValues(string tableName, string databaseName, List<string> columnNames, List<string> columnValues)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.DeleteByColumnValues(columnNames, columnValues);
 }
 public static int DeleteAll(string tableName, string databaseName)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.DeleteAll();
 }
 public static int InsertInto(string tableName, string databaseName, List<string> values, List<string> columns = null)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.Insert(values, columns);
 }