本文整理汇总了C#中System.Item.getIdField方法的典型用法代码示例。如果您正苦于以下问题:C# Item.getIdField方法的具体用法?C# Item.getIdField怎么用?C# Item.getIdField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.getIdField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: build
public bool build(Item item)
{
Hashtable hashtable = item.getBoxView();
Field field = (Field)hashtable[item.getIdField()];
if (!field.IsEmpty())
{
Field field2 = null;
ArrayList coll = new ArrayList();
foreach (string str in hashtable.Keys)
{
field2 = (Field)hashtable[str];
if (!str.Equals(item.getIdField()) && field2.Touched())
{
coll.Add(str + "=" + field2.toSql());
}
}
if (coll.Count > 0)
{
StringTheory theory = new StringTheory();
theory.Join(coll, ", ");
StringTheory val = new StringTheory("UPDATE %tableName% SET %pairListing% WHERE %idField% = %id%");
val.Replace("%tableName%", item.getStreamName());
val.Replace("%pairListing%", theory);
val.Replace("%idField%", item.getIdField());
val.Replace("%id%", field.toSql());
base.Append(val);
}
}
return false;
}
示例2: build
protected override void build(Item item, int limit)
{
string val = item.getStreamName();
string str2 = item.getIdField();
StringTheory condition = new StringTheory();
base.BuildCondition(condition, item);
if (limit > -1)
{
StringTheory theory2 = new StringTheory("SELECT TOP %limit% %id_field% FROM %table%");
theory2.Replace("%limit%", limit);
theory2.Replace("%id_field%", item.getIdField());
theory2.Replace("%table%", val);
if ((condition != null) && (condition.Length > 0))
{
theory2.Append(" WHERE ");
theory2.Append(condition);
}
base.Append("DELETE FROM ");
base.Append(val);
base.Append(" WHERE ");
base.Append(string.Concat(new object[] { item.getIdField(), " IN (", theory2, ")" }));
}
else
{
base.Append("DELETE FROM ");
base.Append(val);
if ((condition != null) && (condition.Length > 0))
{
base.Append(" WHERE ");
base.Append(condition);
}
}
}
示例3: build
public void build(Item item)
{
StringTheory val = new StringTheory("SELECT TOP 1 %idField% FROM %tableName% WHERE %idField% = '%id%'");
val.Replace("%idField%", item.getIdField());
val.Replace("%tableName%", item.getStreamName());
val.Replace("%id%", item.Id);
base.Append(val);
}
示例4: build
protected override void build(Item item, int limit)
{
string val = item.getStreamName();
string str2 = item.getIdField();
StringTheory condition = new StringTheory();
base.BuildCondition(condition, item);
base.Append("DELETE FROM ");
base.Append(val);
if ((condition != null) && (condition.Length > 0))
{
base.Append(" WHERE ");
base.Append(condition);
}
if (limit > -1)
{
base.Append(" LIMIT " + limit);
}
}
示例5: build
protected override void build(Item entity, int limit)
{
string str = entity.getStreamName();
string str2 = entity.getIdField();
StringTheory condition = new StringTheory();
base.BuildCondition(condition, entity);
OracleSelectQuery query = new OracleSelectQuery(entity, -1);
base.Append("DELETE FROM " + str);
if (condition.Length > 0)
{
base.Append(" WHERE " + condition);
if (limit > -1)
{
base.Append(" AND rownum < ");
base.Append(limit + 1);
}
}
else if (limit > -1)
{
base.Append(" WHERE rownum < ");
base.Append(limit + 1);
}
}