protected void UpdateCommand(DatabaseParameters keys, DatabaseParameters values, string table) { int num; StringBuilder builder = new StringBuilder("UPDATE " + table + " SET "); if (values != null) { for (num = 0; num < values.Count; num++) { builder.Append(values[num].FieldName + " = " + (((values[num].ParamType == DBDataType.Formula) || (values[num].ParamType == DBDataType.SQLFormula)) ? values[num].FieldValue : ((values[num].FieldValue.Length > 0) ? ((values[num].IsUnicode ? "N" : "") + "'" + values[num].FieldValue + "'") : (values[num].IsNullable ? "NULL" : "''"))) + ","); } } builder.Remove(builder.Length - 1, 1); if (keys != null) { for (num = 0; num < keys.Count; num++) { builder.Append((num == 0) ? " WHERE " : (" " + keys[num].ParamLinkage.ToString() + " ")); builder.Append(((keys[num].ParamType == DBDataType.Formula) || (keys[num].ParamType == DBDataType.SQLFormula)) ? (keys[num].FieldName + " = " + keys[num].FieldValue) : (keys[num].FieldName + " = '" + keys[num].FieldValue + "'")); } } sql = builder.ToString(); }
public void Remove(DatabaseParameters value) { base.List.Remove(value); }
public int IndexOf(DatabaseParameters value) { return(base.List.IndexOf(value)); }
public void Insert(int index, DatabaseParameters value) { base.List.Insert(index, value); }
public int Add(DatabaseParameters value) { return(base.List.Add(value)); }