Example #1
0
 public override QField[] GetFieldExtensions(QField Field)
 {
     if (Field == this.Fields["EventParticipants"])
         return new QField[]{new QField("EventParticipants","Participants", "{0}.LastName + ' ' + {0}.FirstName", DbType.String,QFieldUsingType.Field|QFieldUsingType.Grouping|QFieldUsingType.Filter,
                                new QFieldJoinRelation(this.OwnerTable,"USERS","ManagerId","PrincipalId"))};
     return null;
 }
Example #2
0
 public QSqlSelectFieldMaker(QField	Field, bool	IsNULL, string	Alias, bool IsHidden)
 {
     this.Field = Field;
     this.IsNULL = IsNULL;
     this.Alias = Alias;
     this.IsHidden = IsHidden;
 }
Example #3
0
 public int IndexOf(QField	field)
 {
     for(int Index = 0;Index<this.List.Count;Index++)
     {
         if(field==(QField)this.List[Index])
         {
             return Index;
         }
     }
     return -1;
 }
Example #4
0
        public QDictionary this[QField FieldValue]
        {
            get
            {
                foreach(QDictionary dic in this.List)
                {
                    if(dic.FieldValue==FieldValue)
                        return dic;
                }

                return null;
            }
        }
Example #5
0
        protected void AddItemKeyToSelect(QSqlSelectMaker select)
        {
            bool bShowAlias = false;

            // Add Root Static Field [4/21/2004]
            select.AddField(new QSqlSelectFieldMaker(new QField(_ReportName), false, bShowAlias?"Report!1!Name":null));

            // Add Group Fields [4/20/2004]
            foreach (QField tmpGroupField in this.Groups)
            {
                // Step 1. Add Groups Item [4/21/2004]

                select.AddField(new QSqlSelectFieldMaker(new QField(tmpGroupField.FriendlyName), false, null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField, false, null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField.Relations == null?tmpGroupField:(new QField(tmpGroupField.Name, tmpGroupField.FriendlyName, tmpGroupField.FieldValueIsKey?tmpGroupField.DBName:tmpGroupField.Relations[tmpGroupField.Relations.Length - 1].DestKey, tmpGroupField.DataType, tmpGroupField.UsingType, tmpGroupField.Relations)), false, null));
            }

            // Add Key Field [4/21/2004]
            if (this.OwnerObject.KeyField != null)
            {
                QField keyField = this.OwnerObject.KeyField;
                if (_KeyUniquePrefix != null)
                {
                    keyField = new QField(this.OwnerObject.KeyField.Name, this.OwnerObject.KeyField.FriendlyName,
                                          "'" + _KeyUniquePrefix + "' + CONVERT(NVARCHAR(3000),{0}.[" + this.OwnerObject.KeyField.DBName + "],20)",
                                          this.OwnerObject.KeyField.DataType, this.OwnerObject.KeyField.UsingType, true);
                }
                select.AddField(new QSqlSelectFieldMaker(keyField, false, null));
            }

            // [FieldName!Tag!Id] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));
            // [Field!Tag!Name] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));
            // [Field!Tag!Description] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));
            // [FieldName!Tag!Type] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));
            // [FieldName!Tag!DataType] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));

            // New Addon [4/22/2004]
            // [Values!Tag!Value] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null, true, null));
            // End New Addon [4/22/2004]
        }
Example #6
0
        protected QSqlSelectMaker       CreateGroupsSelect(QField group)
        {
            QSqlSelectMaker retVal = null;

            // Create Root [4/21/2004]
            string GroupOwnerTable = group.Relations == null?this.OwnerObject.OwnerTable:group.Relations[group.Relations.Length - 1].DestTable;

            string strTag    = CurrentStepTagLevel.ToString();
            string strParent = CurrentStepTagLevel == 1?"NULL":(CurrentStepTagLevel - 1).ToString();

            retVal = new QSqlSelectMaker(strTag, strParent, GroupOwnerTable, this.TimeOffset, this.Language);

            AddFieldToSelect(retVal);

            return(retVal);
        }
Example #7
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            QField srcField = obj as QField;

            if (srcField == null)
            {
                return(false);
            }

            if (srcField.Name == this.Name /*&&
                                            * srcField.DBName == this.DBName*/)
            {
                return(true);
//				if(srcField.Relations!=null &&
//					this.Relations!=null &&
//					srcField.Relations.Length==this.Relations.Length)
//				{
//					foreach(QFieldJoinRelation srcRelation in srcField.Relations)
//					{
//						foreach(QFieldJoinRelation thisRelation in this.Relations)
//						{
//							if(thisRelation!=srcRelation)
//								return false;
//						}
//					}
//					return true;
//				}
//				else if(srcField.Relations==null && this.Relations==null)
//				{
//					return true;
//				}
            }

            return(false);
        }
Example #8
0
 public IntervalFilterCondition(QField Field, string ValueLess, string ValueGreat) : base(Field)
 {
     _ValueLess  = ValueLess;
     _ValueGreat = ValueGreat;
 }
Example #9
0
 public virtual QField[] GetFieldExtensions(QField Field)
 {
     return null;
 }
Example #10
0
 public virtual QDictionary GetDictionary(QField FieldValue)
 {
     return _Dic[FieldValue];
 }
Example #11
0
 public virtual QField[] GetFieldExtensions(QField Field)
 {
     return(null);
 }
Example #12
0
 public void Add(QField field)
 {
     //TODO: Add Check Unique field.
     this.List.Add(field);
 }
Example #13
0
        public static void LoadMetaField(QObject qObject, MetaClass currentClass)
        {
            foreach (MetaField field in currentClass.UserMetaFields)
            {
                if (qObject.Fields[string.Format("{1}", qObject.OwnerTable, field.Name)] != null)
                    continue;

                switch (field.DataType)
                {
                    case MetaDataType.DictionaryMultivalue:
                    case MetaDataType.EnumMultivalue:
                        QField MFieldValue = new QField(string.Format("{1}", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            "Value",
                            DbType.String,
                            QFieldUsingType.Field | QFieldUsingType.Grouping | QFieldUsingType.Filter,
                            new QFieldJoinRelation[]{
                                                        new QFieldJoinRelation(qObject.OwnerTable,currentClass.TableName,qObject.KeyField.DBName,"ObjectId"),
                                                        new QFieldJoinRelation(currentClass.TableName,"MetaMultivalueDictionary",field.Name,"MetaKey"),
                                                        new QFieldJoinRelation("MetaMultivalueDictionary","MetaDictionary","MetaDictionaryId","MetaDictionaryId",new SimpleFilterCondition(new QField("MetaFieldId"),field.Id.ToString(),SimpleFilterType.Equal))
                                                    }
                            );

                        QField MFieldId = new QField(string.Format("{1}Id", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            "MetaDictionaryId",
                            DbType.String,
                            QFieldUsingType.Abstract,
                            new QFieldJoinRelation[]{
                                                        new QFieldJoinRelation(qObject.OwnerTable,currentClass.TableName,qObject.KeyField.DBName,"ObjectId"),
                                                        new QFieldJoinRelation(currentClass.TableName,"MetaMultivalueDictionary",field.Name,"MetaKey"),
                                                        new QFieldJoinRelation("MetaMultivalueDictionary","MetaDictionary","MetaDictionaryId","MetaDictionaryId",new SimpleFilterCondition(new QField("MetaFieldId"),field.Id.ToString(),SimpleFilterType.Equal))
                                                    }
                            );

                        qObject.Fields.Add(MFieldValue);
                        qObject.Fields.Add(MFieldId);

                        qObject.Dictionary.Add(new QDictionary(MFieldId, MFieldValue, string.Format("SELECT MetaDictionaryId as Id, Value FROM MetaDictionary WHERE MetaFieldId = {0}", field.Id)));
                        break;
                    case MetaDataType.DictionarySingleValue:
                    case MetaDataType.EnumSingleValue:
                        QField SFieldValue = new QField(string.Format("{1}", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            "Value",
                            DbType.String,
                            QFieldUsingType.Field | QFieldUsingType.Grouping | QFieldUsingType.Filter | QFieldUsingType.Sort,
                            new QFieldJoinRelation[]{
                                                        new QFieldJoinRelation(qObject.OwnerTable,currentClass.TableName,qObject.KeyField.DBName,"ObjectId"),
                                                        new QFieldJoinRelation(currentClass.TableName,"MetaDictionary",field.Name,"MetaDictionaryId",new SimpleFilterCondition(new QField("MetaFieldId"),field.Id.ToString(),SimpleFilterType.Equal) )
                                                    }
                            );

                        QField SFieldId = new QField(string.Format("{1}Id", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            "MetaDictionaryId",
                            DbType.String,
                            QFieldUsingType.Abstract,
                            new QFieldJoinRelation[]{
                                                        new QFieldJoinRelation(qObject.OwnerTable,currentClass.TableName,qObject.KeyField.DBName,"ObjectId"),
                                                        new QFieldJoinRelation(currentClass.TableName,"MetaDictionary",field.Name,"MetaDictionaryId",new SimpleFilterCondition(new QField("MetaFieldId"),field.Id.ToString(),SimpleFilterType.Equal) )
                                                    }
                            );

                        qObject.Fields.Add(SFieldValue);
                        qObject.Fields.Add(SFieldId);

                        qObject.Dictionary.Add(new QDictionary(SFieldId, SFieldValue, string.Format("SELECT MetaDictionaryId as Id, Value FROM MetaDictionary WHERE MetaFieldId = {0}", field.Id)));
                        break;
                    case MetaDataType.Image:
                    case MetaDataType.Binary:
                        // Ignory [12/8/2004]
                        break;
                    case MetaDataType.File:
                    case MetaDataType.ImageFile:
                        qObject.Fields.Add(new QField(string.Format("{1}", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            "FileName",
                            DbType.String,
                            QFieldUsingType.Field | QFieldUsingType.Grouping,
                            new QFieldJoinRelation[]{
                                                        new QFieldJoinRelation(qObject.OwnerTable,currentClass.TableName,qObject.KeyField.DBName,"ObjectId"),
                                                        new QFieldJoinRelation(currentClass.TableName,"MetaFileValue",field.Name,"MetaKey")
                                                    }
                            ));

                        break;
                    case MetaDataType.LongHtmlString:
                    case MetaDataType.LongString:
                        qObject.Fields.Add(new QField(string.Format("{1}", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            field.Name,
                            MetaDataType2DbType(field.DataType),
                            QFieldUsingType.Field | QFieldUsingType.Grouping | QFieldUsingType.Sort,
                            new QFieldJoinRelation(qObject.OwnerTable, currentClass.TableName, qObject.KeyField.DBName, "ObjectId"))
                            );
                        break;
                    default:
                        qObject.Fields.Add(new QField(string.Format("{1}", qObject.OwnerTable, field.Name),
                            field.FriendlyName,
                            field.Name,
                            MetaDataType2DbType(field.DataType),
                            QFieldUsingType.Field | QFieldUsingType.Grouping | QFieldUsingType.Filter | QFieldUsingType.Sort,
                            new QFieldJoinRelation(qObject.OwnerTable, currentClass.TableName, qObject.KeyField.DBName, "ObjectId"))
                            );
                        break;
                }
            }
        }
Example #14
0
        public SimpleFilterCondition(QField	Field, string[] Values, SimpleFilterType Type)
            : base(Field)
        {
            bool bFirst = true;

            _Value = "";

            if(Values!=null)
            {
                foreach(string Value in Values)
                {
                    if(bFirst)
                        bFirst = false;
                    else
                        _Value += " OR ";
                    if(Value=="NULL"||Value=="NOT NULL")
                        _Value += "{0} IS " + base.GetSqlValue(Field, Value);
                    else
                        _Value += "{0} {1} " + base.GetSqlValue(Field, Value);
                }
            }

            _Type = Type;
        }
Example #15
0
 public IntervalFilterCondition(QField	Field, string ValueLess, string ValueGreat)
     : base(Field)
 {
     _ValueLess = ValueLess;
     _ValueGreat = ValueGreat;
 }
Example #16
0
 public FilterCondition(QField Field)
 {
     _Field = Field;
 }
Example #17
0
        protected void AddLastFieldToSelect(QSqlSelectMaker select, QField availableField, QField exField, bool bFinalStep)
        {
            bool bShowAlias = false;

            // Add Root Static Field [4/21/2004]
            select.AddField(new QSqlSelectFieldMaker(new QField(_ReportName), false, bShowAlias?"Report!1!Name":null));

            // Add Group Fields [4/20/2004]
            foreach (QField tmpGroupField in this.Groups)
            {
                // Step 1. Add Groups Item [4/21/2004]
                select.AddField(new QSqlSelectFieldMaker(new QField(tmpGroupField.FriendlyName), false, null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField, false, null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField.Relations == null?tmpGroupField:(new QField(tmpGroupField.FriendlyName, tmpGroupField.FriendlyName, tmpGroupField.FieldValueIsKey?tmpGroupField.DBName:tmpGroupField.Relations[tmpGroupField.Relations.Length - 1].DestKey, tmpGroupField.DataType, tmpGroupField.UsingType, tmpGroupField.Relations)), false, null));
            }

            // Add Key Field [4/21/2004]
            if (this.OwnerObject.KeyField != null)
            {
                QField keyField = this.OwnerObject.KeyField;
                if (_KeyUniquePrefix != null)
                {
                    keyField = new QField(this.OwnerObject.KeyField.Name, this.OwnerObject.KeyField.FriendlyName,
                                          "'" + _KeyUniquePrefix + "' + CONVERT(NVARCHAR(3000),{0}.[" + this.OwnerObject.KeyField.DBName + "],20)",
                                          this.OwnerObject.KeyField.DataType, this.OwnerObject.KeyField.UsingType, true);
                }
                select.AddField(new QSqlSelectFieldMaker(keyField, false, null));
            }

            if (bFinalStep)
            {
                // [FieldName!Tag!Id] [4/22/2004]
                select.AddField(new QSqlSelectFieldMaker(new QField(this.Fields.IndexOf(availableField).ToString("000")), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Name), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.FriendlyName), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Relations == null?"1":(availableField.Relations.Length == 1?"2":"3")), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.DataType.ToString()), false, null));
                if (exField != null)
                {
                    select.AddField(new QSqlSelectFieldMaker(exField, false, null));
                }
                else
                {
                    select.AddField(new QSqlSelectFieldMaker(availableField, false, null));
                }
            }
            else
            {
                // Add Fields [4/20/2004]
                //foreach(QField availableFields in this.Fields)
                //{
                select.AddField(new QSqlSelectFieldMaker(new QField(this.Fields.IndexOf(availableField).ToString("000")), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Name), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.FriendlyName), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Relations == null?"1":(availableField.Relations.Length == 1?"2":"3")), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.DataType.ToString()), false, null));
                select.AddField(new QSqlSelectFieldMaker(null, true, null));
                //}
            }
        }
Example #18
0
 public void Add(QField field)
 {
     //TODO: Add Check Unique field.
     this.List.Add(field);
 }
Example #19
0
        protected virtual string GetSqlValue(QField field, string value)
        {
            if (field != null && field.DataType == System.Data.DbType.Guid)
                return "'" + value + "'";

            return value;
        }
Example #20
0
        protected void AddItemKeyToSelect(QSqlSelectMaker	select)
        {
            bool bShowAlias	=	false;

            // Add Root Static Field [4/21/2004]
            select.AddField(new QSqlSelectFieldMaker(new QField(_ReportName),false,bShowAlias?"Report!1!Name":null));

            // Add Group Fields [4/20/2004]
            foreach(QField tmpGroupField in this.Groups)
            {
                // Step 1. Add Groups Item [4/21/2004]

                select.AddField(new QSqlSelectFieldMaker(new QField(tmpGroupField.FriendlyName),false,null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField,false,null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField.Relations==null?tmpGroupField:(new QField(tmpGroupField.Name,tmpGroupField.FriendlyName,tmpGroupField.FieldValueIsKey?tmpGroupField.DBName:tmpGroupField.Relations[tmpGroupField.Relations.Length-1].DestKey,tmpGroupField.DataType,tmpGroupField.UsingType,tmpGroupField.Relations)),false,null));
            }

            // Add Key Field [4/21/2004]
            if(this.OwnerObject.KeyField!=null)
            {
                QField	keyField = this.OwnerObject.KeyField;
                if(_KeyUniquePrefix!=null)
                {
                    keyField = new QField(this.OwnerObject.KeyField.Name, this.OwnerObject.KeyField.FriendlyName,
                        "'" + _KeyUniquePrefix+ "' + CONVERT(NVARCHAR(3000),{0}.["+this.OwnerObject.KeyField.DBName+"],20)",
                        this.OwnerObject.KeyField.DataType,this.OwnerObject.KeyField.UsingType,true);
                }
                select.AddField(new QSqlSelectFieldMaker(keyField,false,null));
            }

            // [FieldName!Tag!Id] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));
            // [Field!Tag!Name] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));
            // [Field!Tag!Description] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));
            // [FieldName!Tag!Type] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));
            // [FieldName!Tag!DataType] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));

            // New Addon [4/22/2004]
            // [Values!Tag!Value] [4/22/2004]
            select.AddField(new QSqlSelectFieldMaker(null,true,null));
            // End New Addon [4/22/2004]
        }
Example #21
0
 public SimpleFilterCondition(QField	Field, string Value, SimpleFilterType Type)
     : base(Field)
 {
     if(Value!=null)
         _Value = "{0} {1} " + base.GetSqlValue(Field, Value);
     _Type = Type;
 }
Example #22
0
        protected void AddLastFieldToSelect(QSqlSelectMaker	select, QField availableField, QField exField,bool bFinalStep)
        {
            bool bShowAlias	=	false;

            // Add Root Static Field [4/21/2004]
            select.AddField(new QSqlSelectFieldMaker(new QField(_ReportName),false,bShowAlias?"Report!1!Name":null));

            // Add Group Fields [4/20/2004]
            foreach(QField tmpGroupField in this.Groups)
            {
                // Step 1. Add Groups Item [4/21/2004]
                select.AddField(new QSqlSelectFieldMaker(new QField(tmpGroupField.FriendlyName),false,null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField,false,null));

                select.AddField(new QSqlSelectFieldMaker(tmpGroupField.Relations==null?tmpGroupField:(new QField(tmpGroupField.FriendlyName,tmpGroupField.FriendlyName,tmpGroupField.FieldValueIsKey?tmpGroupField.DBName:tmpGroupField.Relations[tmpGroupField.Relations.Length-1].DestKey,tmpGroupField.DataType,tmpGroupField.UsingType,tmpGroupField.Relations)),false,null));
            }

            // Add Key Field [4/21/2004]
            if(this.OwnerObject.KeyField!=null)
            {
                QField	keyField = this.OwnerObject.KeyField;
                if(_KeyUniquePrefix!=null)
                {
                    keyField = new QField(this.OwnerObject.KeyField.Name, this.OwnerObject.KeyField.FriendlyName,
                        "'" + _KeyUniquePrefix+ "' + CONVERT(NVARCHAR(3000),{0}.["+this.OwnerObject.KeyField.DBName+"],20)",
                        this.OwnerObject.KeyField.DataType,this.OwnerObject.KeyField.UsingType,true);
                }
                select.AddField(new QSqlSelectFieldMaker(keyField,false,null));
            }

            if(bFinalStep)
            {
                // [FieldName!Tag!Id] [4/22/2004]
                select.AddField(new QSqlSelectFieldMaker(new QField(this.Fields.IndexOf(availableField).ToString("000")), false, null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Name),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.FriendlyName),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Relations==null?"1":(availableField.Relations.Length==1?"2":"3") ),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.DataType.ToString()),false,null));
                if(exField!=null)
                    select.AddField(new QSqlSelectFieldMaker(exField,false,null));
                else
                    select.AddField(new QSqlSelectFieldMaker(availableField,false,null));
            }
            else
            {
                // Add Fields [4/20/2004]
                //foreach(QField availableFields in this.Fields)
                //{
                select.AddField(new QSqlSelectFieldMaker(new QField(this.Fields.IndexOf(availableField).ToString("000")),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Name),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.FriendlyName),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.Relations==null?"1":(availableField.Relations.Length==1?"2":"3") ),false,null));
                select.AddField(new QSqlSelectFieldMaker(new QField(availableField.DataType.ToString()),false,null));
                select.AddField(new QSqlSelectFieldMaker(null,true,null));
                //}
            }
        }
Example #23
0
 public FilterCondition(QField	Field)
 {
     _Field = Field;
 }
Example #24
0
        protected QSqlSelectMaker CreateGroupSelect(QField	group)
        {
            QSqlSelectMaker	retVal	=	null;

            // Create Root [4/21/2004]
            string GroupOwnerTable = group.Relations==null?this.OwnerObject.OwnerTable:group.Relations[group.Relations.Length-1].DestTable;

            string strTag = CurrentStepTagLevel.ToString();
            string strParent = CurrentStepTagLevel==1?"NULL":(CurrentStepTagLevel-1).ToString();

            retVal	=	new QSqlSelectMaker(strTag, strParent, GroupOwnerTable,this.TimeOffset,this.Language,group.Relations==null);

            AddFieldToSelect(retVal);

            // Where Extension Addon [4/30/2004]
            if(this.OwnerObject.GetWhereExtensions()!=null && GroupOwnerTable==this.OwnerObject.OwnerTable)
            {
                foreach(FilterCondition	exFilter in this.OwnerObject.GetWhereExtensions())
                {
                    retVal.AddFilter(exFilter);
                }
            }
            // end [4/30/2004]

            //			foreach(FilterCondition filter in this.Filters)
            //			{
            //				if(group==filter.OwnerField)
            //					retVal.AddFilter(filter);
            //			}

            return retVal;
        }
Example #25
0
 public QDictionary(QField	Id,	QField	Value,	string SQLQuery)
 {
     _fieldId = Id;
     _fieldValue = Value;
     _sqlQuery = SQLQuery;
 }
Example #26
0
        protected QSqlSelectMaker CreateGroupsSelect(QField	group)
        {
            QSqlSelectMaker	retVal	=	null;

            // Create Root [4/21/2004]
            string GroupOwnerTable = group.Relations==null?this.OwnerObject.OwnerTable:group.Relations[group.Relations.Length-1].DestTable;

            string strTag = CurrentStepTagLevel.ToString();
            string strParent = CurrentStepTagLevel==1?"NULL":(CurrentStepTagLevel-1).ToString();

            retVal	=	new QSqlSelectMaker(strTag, strParent, GroupOwnerTable,this.TimeOffset,this.Language);

            AddFieldToSelect(retVal);

            return retVal;
        }
Example #27
0
 public QDictionary(QField Id, QField Value, string SQLQuery)
 {
     _fieldId    = Id;
     _fieldValue = Value;
     _sqlQuery   = SQLQuery;
 }
Example #28
0
        protected QSqlSelectMaker CreateLastSelect(int TagLevel, QField field, QField exField, bool bFinalStep)
        {
            QSqlSelectMaker	retVal	=	null;

            string strTag = TagLevel.ToString();
            string strParent = TagLevel==1?"NULL":(TagLevel-1).ToString();

            retVal	=	new QSqlSelectMaker(strTag, strParent, this.OwnerObject.OwnerTable,this.TimeOffset,this.Language);

            AddLastFieldToSelect(retVal,field,exField,bFinalStep);

            // Add Filter [4/20/2004]
            //if(bFinalStep)
            {
                foreach(FilterCondition filter in this.Filters)
                {
                    retVal.AddFilter(filter);
                }
            }

            // Where Extension Addon [4/30/2004]
            if(this.OwnerObject.GetWhereExtensions()!=null)
            {
                foreach(FilterCondition	exFilter in this.OwnerObject.GetWhereExtensions())
                {
                    retVal.AddFilter(exFilter);
                }
            }
            // end [4/30/2004]

            return retVal;
        }
Example #29
0
 public virtual QDictionary GetDictionary(QField FieldValue)
 {
     return(_Dic[FieldValue]);
 }
Example #30
0
 public QSqlSelectFieldMaker(QField Field, bool IsNULL, string Alias)
 {
     this.Field  = Field;
     this.IsNULL = IsNULL;
     this.Alias  = Alias;
 }