當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。