Exemplo n.º 1
0
 public override void Run()
 {
     if (this.Owner is ObjectNode)
     {
         ObjectNode owner = (ObjectNode) this.Owner;
         TyQuery query = new TyQuery();
         query.Id = StringHelper.GetNewGuid();
         query.Name = "新查询";
         query.DisplayOrder = owner.Nodes.Count + 1;
         query.Sql = "select * from 表名 where {0}";
         query.QueryWheres = new List<TyQueryWhere>();
         query.Save();
         owner.AddSingleNode<TyQuery, TyQueryNode>(query);
     }
 }
Exemplo n.º 2
0
 protected virtual void AddConditionFieldToCmb(TyQuery query)
 {
     this.cmbrs_fld.Items.Clear();
     this.cmbrs_cnd.Items.Clear();
     this.cmbrs_type.Items.Clear();
     this.cmbrs_tableName.Items.Clear();
     foreach (TyQueryWhere where in query.QueryWheres)
     {
         this.cmbrs_cnd.Items.Add(where.Description);
         this.cmbrs_fld.Items.Add(where.Name);
         this.cmbrs_type.Items.Add(where.ColumnType);
         this.cmbrs_tableName.Items.Add(where.TableName);
     }
 }
Exemplo n.º 3
0
 protected TreeNode AddChildNode(TreeNode pnode, TyQuery query)
 {
     TreeNode node = pnode.Nodes.Add(query.Name);
     node.Tag = query;
     return node;
 }