当前位置: 首页>>代码示例>>C#>>正文


C# Item.getStreamName方法代码示例

本文整理汇总了C#中System.Item.getStreamName方法的典型用法代码示例。如果您正苦于以下问题:C# Item.getStreamName方法的具体用法?C# Item.getStreamName怎么用?C# Item.getStreamName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Item的用法示例。


在下文中一共展示了Item.getStreamName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
 }
开发者ID:built,项目名称:BoxBoy,代码行数:30,代码来源:SqlBoxUpdateQuery.cs

示例2: build

 public bool build(Item item)
 {
     StringTheory theory = new StringTheory();
     StringTheory theory2 = new StringTheory();
     Field field = null;
     Hashtable hashtable = item.getBoxView();
     ArrayList coll = new ArrayList();
     ArrayList list2 = new ArrayList();
     foreach (string str in hashtable.Keys)
     {
         field = (Field)hashtable[str];
         if ((field != null) && field.Touched())
         {
             coll.Add(str);
             list2.Add(field.toSql());
         }
     }
     theory.Join(coll, ", ");
     theory2.Join(list2, ", ");
     if (coll.Count > 0)
     {
         StringTheory val = new StringTheory("INSERT INTO %tableName% (%fields%) VALUES (%values%)");
         val.Replace("%tableName%", item.getStreamName());
         val.Replace("%fields%", theory);
         val.Replace("%values%", theory2);
         base.Append(val);
     }
     return false;
 }
开发者ID:built,项目名称:BoxBoy,代码行数:29,代码来源:SqlBoxInsertQuery.cs

示例3: 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);
         }
     }
 }
开发者ID:built,项目名称:BoxBoy,代码行数:33,代码来源:SqlServerDeleteQuery.cs

示例4: 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);
 }
开发者ID:built,项目名称:BoxBoy,代码行数:8,代码来源:SqlServerFindQuery.cs

示例5: build

 public bool build(Item entity, int max)
 {
     base.Erase();
     if (entity != null)
     {
         StringTheory condition = new StringTheory();
         StringTheory spec = new StringTheory();
         base.BuildCondition(condition, entity);
         if (entity.getSortList().Count > 0)
         {
             this.AppendSortSpecification(spec, entity);
         }
         this.AppendSelectQuery(entity.getStreamName(), condition, spec, max);
     }
     return (base.Length > 0);
 }
开发者ID:built,项目名称:BoxBoy,代码行数:16,代码来源:SqlBoxSelectQuery.cs

示例6: 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);
     }
 }
开发者ID:built,项目名称:BoxBoy,代码行数:18,代码来源:MySqlDeleteQuery.cs

示例7: 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);
     }
 }
开发者ID:built,项目名称:BoxBoy,代码行数:23,代码来源:OracleDeleteQuery.cs


注:本文中的System.Item.getStreamName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。