Exemplo n.º 1
0
 void entity_PropertyGetting(object sender, PropertyGettingEventArgs e)
 {
     if (!selectFields.Contains(e.PropertyName))
     {
         selectFields.Add(e.PropertyName);
     }
 }
Exemplo n.º 2
0
        private void CurrEntity_PropertyGetting(object sender, PropertyGettingEventArgs e)
        {
            //int n = 0;
            //while (paras.ContainsKey(e.PropertyName  + n))
            //    n++;
            //currParaName = e.PropertyName.Replace(" ", "") + n;//消除实际字段名中的空格
            //PostgreSQL的dotConnect驱动不支持参数名中的中文,故注释上面的代码,采用数字编号
            currParaName = "P" + this.paraIndex;
            currFieldName = "[" + e.PropertyName + "]";
            this.paraIndex++;

        }
Exemplo n.º 3
0
        private void CurrEntity_PropertyGetting(object sender, PropertyGettingEventArgs e)
        {
            string propName = "";
            if (this.CurrOQL.HaveJoinOpt)
            {
                //如果是连接操作,条件字段需要增加上查询的表名称
                string tableName = ((EntityBase)sender).TableName;
                propName = "[" + tableName + "].[" + e.PropertyName + "]";
            }
            else
            {
                propName = "[" + e.PropertyName + "]";
            }

            if (Selected & !useWhereMethod)
            {
                if (paras == null)
                    paras = new Dictionary<string, object>();
                if (!paras.ContainsKey(propName))
                {
                    //在选取Where字段,Where方法尚未执行完成
                    paras.Add(propName, this.CurrEntity.PropertyList(e.PropertyName));
                }
            }
            currFieldName = propName;// "[" + e.PropertyName + "]";

        }
Exemplo n.º 4
0
 void e_PropertyGetting(object sender, PropertyGettingEventArgs e)
 {
     doPropertyGetting(((EntityBase)sender).TableName, e.PropertyName);
 }
Exemplo n.º 5
0
        void CurrEntity_PropertyGetting(object sender, PropertyGettingEventArgs e)
        {
            if (this.joinedEntityList != null)
            {
                this.currPropName = "[" + ((EntityBase)sender).TableName + "].[" + e.PropertyName + "]";
            }
            else
            {
                this.currPropName = "[" + e.PropertyName + "]";
                //propertyList.Add(e.PropertyName);
            }

        }
Exemplo n.º 6
0
 void entity_PropertyGetting(object sender, PropertyGettingEventArgs e)
 {
     this.currPropName = e.PropertyName;
 }
Exemplo n.º 7
0
 void entity_PropertyGetting(object sender, PropertyGettingEventArgs e)
 {
     this.currPropName = e.PropertyName;
 }