Пример #1
0
        /// <summary>
        /// NOTE: This is called by the dOOdad framework and you should never call it. We reserve the right to remove or change this method.
        /// </summary>
        /// <param name="wItem">The AggregateParameter</param>
        public void AddAggregateParameter(AggregateParameter wItem)
        {
            if (_aggregateParameters == null)
            {
                _aggregateParameters = new ArrayList();
            }

            _aggregateParameters.Add(wItem);

            // We don't allow Save() to succeed once they reduce the columns
            this._entity._canSave = false;
        }
Пример #2
0
        protected string GetAggregate(AggregateParameter wItem, bool withAlias)
        {
            string query = string.Empty;

            switch (wItem.Function)
            {
            case AggregateParameter.Func.Avg:
                query += "AVG(";
                break;

            case AggregateParameter.Func.Count:
                query += "COUNT(";
                break;

            case AggregateParameter.Func.Max:
                query += "MAX(";
                break;

            case AggregateParameter.Func.Min:
                query += "MIN(";
                break;

            case AggregateParameter.Func.Sum:
                query += "SUM(";
                break;

            case AggregateParameter.Func.StdDev:
                query += "STDDEV(";
                break;

            case AggregateParameter.Func.Var:
                query += "VAR(";
                break;
            }

            if (wItem.Distinct)
            {
                query += "DISTINCT ";
            }

            query += D(wItem.Column) + ")";

            if (withAlias && wItem.Alias != string.Empty)
            {
                // Need DBMS string delimiter here
                query += " AS " + D(wItem.Alias);
            }

            return(query);
        }
Пример #3
0
        protected string GetAggregate(AggregateParameter wItem, bool withAlias)
        {
            string query = string.Empty;

            switch (wItem.Function)
            {
            case AggregateParameter.Func.Avg:
                query += "Avg(";
                break;

            case AggregateParameter.Func.Count:
                query += "Count(";
                break;

            case AggregateParameter.Func.Max:
                query += "Max(";
                break;

            case AggregateParameter.Func.Min:
                query += "Min(";
                break;

            case AggregateParameter.Func.Sum:
                query += "Sum(";
                break;

            case AggregateParameter.Func.StdDev:
                query += "StDev(";
                break;

            case AggregateParameter.Func.Var:
                query += "Var(";
                break;
            }

            if (wItem.Distinct)
            {
                query += "DISTINCT ";
            }

            query += wItem.Column;

            if (withAlias && wItem.Alias != string.Empty)
            {
                query += " AS " + wItem.Alias;
            }

            return(query);
        }
		protected string GetAggregate(AggregateParameter wItem, bool withAlias)
		{
			string query = string.Empty;

			switch(wItem.Function)
			{
				case AggregateParameter.Func.Avg:
					query += "AVG(";
					break;
				case AggregateParameter.Func.Count:
					query += "COUNT(";
					break;
				case AggregateParameter.Func.Max:
					query += "MAX(";
					break;
				case AggregateParameter.Func.Min:
					query += "MIN(";
					break;
				case AggregateParameter.Func.Sum:
					query += "SUM(";
					break;
				case AggregateParameter.Func.StdDev:
					query += "TRUNC(STDDEV(";
					break;
				case AggregateParameter.Func.Var:
					query += "VARIANCE(";
					break;
			}

			if(wItem.Distinct)
			{
				query += "DISTINCT ";
			}

			query += "\"" + wItem.Column + "\")";

			if(wItem.Function == AggregateParameter.Func.StdDev)
			{
				query += ", 10)";
			}
			
			if(withAlias && wItem.Alias != string.Empty)
			{
				// Need DBMS string delimiter here
				query += " AS \"" + wItem.Alias + "\"";
			}
			
			return query;
		}
        protected string GetAggregate(AggregateParameter wItem, bool withAlias)
        {
            string query = string.Empty;

            switch (wItem.Function)
            {
            case AggregateParameter.Func.Avg:
                query += "AVG(";
                break;

            case AggregateParameter.Func.Count:
                query += "COUNT(";
                break;

            case AggregateParameter.Func.Max:
                query += "MAX(";
                break;

            case AggregateParameter.Func.Min:
                query += "MIN(";
                break;

            case AggregateParameter.Func.Sum:
                query += "SUM(";
                break;

            case AggregateParameter.Func.StdDev:
                query += "STDDEV(";
                break;

            case AggregateParameter.Func.Var:
                query += "VARIANCE(";
                break;
            }

            if (wItem.Distinct)
            {
                query += "DISTINCT ";
            }

            query += "`" + wItem.Column + "`)";

            if (withAlias && wItem.Alias != string.Empty)
            {
                query += " AS '" + wItem.Alias + "'";
            }

            return(query);
        }
		protected string GetAggregate(AggregateParameter wItem, bool withAlias)
		{
			string query = string.Empty;

			switch (wItem.Function)
			{
				case AggregateParameter.Func.Avg:
					query += "Avg(";
					break;
				case AggregateParameter.Func.Count:
					query += "Count(";
					break;
				case AggregateParameter.Func.Max:
					query += "Max(";
					break;
				case AggregateParameter.Func.Min:
					query += "Min(";
					break;
				case AggregateParameter.Func.Sum:
					query += "Sum(";
					break;
				case AggregateParameter.Func.StdDev:
					query += "StDev(";
					break;
				case AggregateParameter.Func.Var:
					query += "Var(";
					break;
			}

			if (wItem.Distinct)
			{
				query += "DISTINCT ";
			}

			query += wItem.Column;

			if (withAlias && wItem.Alias != string.Empty)
			{
				query += " AS " + wItem.Alias ;
			}

			return query;
		}
		protected string GetAggregate(AggregateParameter wItem, bool withAlias)
		{
			string query = string.Empty;

			switch(wItem.Function)
			{
				case AggregateParameter.Func.Avg:
					query += "AVG(";
					break;
				case AggregateParameter.Func.Count:
					query += "COUNT(";
					break;
				case AggregateParameter.Func.Max:
					query += "MAX(";
					break;
				case AggregateParameter.Func.Min:
					query += "MIN(";
					break;
				case AggregateParameter.Func.Sum:
					query += "SUM(";
					break;
				case AggregateParameter.Func.StdDev:
					query += "STDDEV(";
					break;
				case AggregateParameter.Func.Var:
					query += "VAR(";
					break;
			}

			if(wItem.Distinct)
			{
				query += "DISTINCT ";
			}

			query += "[" + wItem.Column + "])";
			
			if(withAlias && wItem.Alias != string.Empty)
			{
				query += " AS '" + wItem.Alias + "'";
			}
			
			return query;
		}
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _TypeName_W = null;
                _Description_W = null;
                _IsActive_W = null;
                _Rowguid_W = null;
                _CreatedDate_W = null;
                _ModifiedDate_W = null;
                _ModifiedBy_W = null;
                _ModeCode_W = null;
                _SN_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ComboCommentAttachmentID_W = null;
                _ComboCommnetID_W = null;
                _AttachmentID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #10
0
 public override void AddOrderBy(AggregateParameter aggregate, MyGeneration.dOOdads.WhereParameter.Dir direction)
 {
     base.AddOrderBy(GetAggregate(aggregate, false), direction);
 }
            public void AggregateClauseReset()
            {
                _ComboUserID_W = null;
                _NotificationTypeID_W = null;
                _Status_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _Name_W = null;
                _CountryOfOrigin_W = null;
                _PFSAManufCode_W = null;
                _Phone_W = null;
                _Address_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _Form_W = null;
                _Description_W = null;
                _TypeID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #14
0
 public override void AddGroupBy(AggregateParameter aggregate)
 {
     // Access does not support aggregates in a GROUP BY
     base.AddGroupBy(GetAggregate(aggregate, false));
 }
Пример #15
0
 public override void AddGroupBy(AggregateParameter aggregate)
 {
     base.AddGroupBy(GetAggregate(aggregate, false));
 }
Пример #16
0
            public void AggregateClauseReset()
            {
                _SupplyOrderID_W = null;
                _SupplyOrderNo_W = null;
                _SupplierID_W = null;
                _SupplyOrderDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #17
0
            public void AggregateClauseReset()
            {
                _SectorTypeID_W = null;
                _Name_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #18
0
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _AdText_W = null;
                _AdImage_W = null;
                _RowStatusID_W = null;
                _StartDate_W = null;
                _MemberTypes_W = null;
                _NumOfDays_W = null;
                _NuOfHours_W = null;
                _Timestamp_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #19
0
            public void AggregateClauseReset()
            {
                _CertificateID_W = null;
                _Name_W = null;
                _Path_W = null;
                _CreatedBy_W = null;
                _CreatedDate_W = null;
                _UpdatedBy_W = null;
                _LastUpdatedDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #20
0
            public void AggregateClauseReset()
            {
                _CareerID_W = null;
                _Name_W = null;
                _Email_W = null;
                _FilePath_W = null;
                _Description_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
 public override void AddGroupBy(AggregateParameter aggregate)
 {
     // MySQL4 does not support aggregates in a GROUP BY
     base.AddGroupBy("`" + aggregate.Alias + "`");
 }
Пример #22
0
 /// <summary>
 /// Overloaded to support aggregates.
 /// Derived classes implement this, like SqlClientDynamicQuery and OleDbDynamicQuery
 /// to account for differences in DBMS systems.
 /// </summary>
 /// <param name="aggregate">This should be an entry from your Aggregate class</param>
 /// <param name="direction">Either Descending or Ascending</param>
 /// <example>
 /// <code>
 /// emps.Query.AddOrderBy(emps.Aggregate.CategoryID, WhereParameter.Dir.ASC)</code>
 /// </example>
 public virtual void AddOrderBy(AggregateParameter aggregate, WhereParameter.Dir direction)
 {
 }
            public void AggregateClauseReset()
            {
                _OrgIPID_W = null;
                _MachineID_W = null;
                _OrgIP_W = null;
                _Status_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #24
0
 /// <summary>
 /// Overloaded to support aggregates.
 /// Derived classes implement this, like SqlClientDynamicQuery and OleDbDynamicQuery
 /// to account for differences in DBMS systems.
 /// </summary>
 /// <param name="aggregate">This should be an entry from your Aggregate class</param>
 /// <example>
 /// <code>
 /// emps.Query.AddGroupBy(emps.Aggregate.City)</code>
 /// </example>
 public virtual void AddGroupBy(AggregateParameter aggregate)
 {
 }
Пример #25
0
 public override void AddGroupBy(AggregateParameter aggregate)
 {
     // Support aggregates in a GROUP BY.
     // Common method
     base.AddGroupBy(GetAggregate(aggregate, false));
 }
Пример #26
0
            public void AggregateClauseReset()
            {
                _CrewID_W = null;
                _Name_W = null;
                _StaffNo_W = null;
                _Notes_W = null;
                _CreatedBy_W = null;
                _ModifiedBy_W = null;
                _CreatedDate_W = null;
                _LastModifiedDate_W = null;
                _Username_W = null;
                _RANK_W = null;
                _IDNO_W = null;
                _LicenseNo_W = null;
                _Competenecycheck_W = null;
                _MEDICALLICENSEEXPIRYFrom_W = null;
                _MEDICALLICENSEEXPIRYTo_W = null;
                _InstructorRenewal_W = null;
                _TRANSITIONCOURSE_W = null;
                _RECURRENT12_W = null;
                _RECURRENT24_W = null;
                _SMS_W = null;
                _Security_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #27
0
            public void AggregateClauseReset()
            {
                _AirPortID_W = null;
                _Name_W = null;
                _IATACode_W = null;
                _ACAICode_W = null;
                _Description_W = null;
                _Notes_W = null;
                _CreatedBy_W = null;
                _ModifiedBy_W = null;
                _CreatedDate_W = null;
                _LastModifiedDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _NotificationID_W = null;
                _NotifierID_W = null;
                _NotificationText_W = null;
                _FilePath_W = null;
                _Subject_W = null;
                _CompanyID_W = null;
                _NotifyDate_W = null;
                _Expr1_W = null;
                _CompNameEng_W = null;
                _CompNameAr_W = null;
                _Comp_Code_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _CategoryId_W = null;
                _SubCategoryName_W = null;
                _SubCategoryCode_W = null;
                _Description_W = null;
                _ParentID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #30
0
            public void AggregateClauseReset()
            {
                _CategoryID_W = null;
                _CatNameAr_W = null;
                _CatNameEng_W = null;
                _CatImage_W = null;
                _MainCatId_W = null;
                _HoverImage_W = null;
                _IsPartySupplier_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _ItemID_W = null;
                _RUOwnershipTypeID_W = null;
                _AllowFully_W = null;
                _Warning_W = null;
                _Restriction_W = null;
                _MaxIssueQty_W = null;
                _MaxIssueQtyGapDays_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #32
0
            public void AggregateClauseReset()
            {
                _InAndOutDoorDetailsID_W = null;
                _Item_W = null;
                _MaterialID_W = null;
                _LaminationID_W = null;
                _ServiceID_W = null;
                _Picture_W = null;
                _DeliveryDate_W = null;
                _Width_W = null;
                _Hight_W = null;
                _TotalSize_W = null;
                _DeliveryTo_W = null;
                _JobOrderStatusID_W = null;
                _JobOrderID_W = null;
                _CreatedBy_W = null;
                _CreatedDate_W = null;
                _UpdatedBy_W = null;
                _LastUpdatedDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _ProgramID_W = null;
                _ItemID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #34
0
            public void AggregateClauseReset()
            {
                _ID_W = null;
                _DRUG_REQUEST_SUBSTANCE_ID_W = null;
                _UNIT_ID_W = null;
                _QUANTITY_W = null;
                _EQUI_NAME_SUBSTANCE_W = null;
                _EQUI_QUANTITY_W = null;
                _EQUI_UNIT_W = null;
                _OVER_QUANTITY_W = null;
                _OVER_UNIT_ID_W = null;
                _OVER_EQUI_QUANTITY_W = null;
                _OVER_EQUI_UNIT_W = null;
                _SPECIFICATION_W = null;
                _FUNCTION__W = null;
                _EQUE_SPECIFICATION_W = null;
                _EQUE_FUNCTION_W = null;
                _PHONE_W = null;
                _FAX_W = null;
                _EMAIL_W = null;
                _ADDRESS_W = null;
                _MANUFACTURE_W = null;
                _INSPECTED_FOR_GMP_W = null;
                _PHONE_EQ_W = null;
                _EMAIL_EQ_W = null;
                _ADDRESS_EQ_W = null;
                _MANUFACTURE_EQ_W = null;
                _FAX_EQ_W = null;
                _INSPECTED_FOR_GMP_EQ_W = null;
                _Equiv_Substance_ID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #35
0
            public void AggregateClauseReset()
            {
                _SettingID_W = null;
                _UserName_W = null;
                _Password_W = null;
                _Keywords_uk_W = null;
                _Keywords_en_W = null;
                _Keywords_ru_W = null;
                _Title_uk_W = null;
                _Title_en_W = null;
                _Title_ru_W = null;
                _Description_uk_W = null;
                _Description_en_W = null;
                _Description_ru_W = null;
                _TitleSuffix_uk_W = null;
                _TitleSuffix_en_W = null;
                _TitleSuffix_ru_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
            public void AggregateClauseReset()
            {
                _DigitalPrintingDetailsID_W = null;
                _JobOrderID_W = null;
                _PrintingTypeID_W = null;
                _IsRAndV_W = null;
                _SupplierID_W = null;
                _DeliveryDoneTo_W = null;
                _JobOrderStatusID_W = null;
                _CreatedBy_W = null;
                _CreatedDate_W = null;
                _UpdatedBy_W = null;
                _LastUpdatedDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #37
0
            public void AggregateClauseReset()
            {
                _ComboUserID_W = null;
                _UserName_W = null;
                _DisplayName_W = null;
                _Password_W = null;
                _Email_W = null;
                _ProfileImgID_W = null;
                _CoverImgID_W = null;
                _GenderID_W = null;
                _Bio_W = null;
                _IsActivated_W = null;
                _ActivationCode_W = null;
                _ExternalID_W = null;
                _ExternalIDType_W = null;
                _DeviceID_W = null;
                _PassResetCode_W = null;
                _IsDeactivated_W = null;
                _SecurityQuestion_W = null;
                _SecurityAnswer_W = null;
                _UserRankID_W = null;
                _SecurityWord_W = null;
                _BirthDate_W = null;
                _Country_W = null;
                _Phone_W = null;
                _Website_W = null;
                _CountryID_W = null;
                _Location_W = null;
                _IsPrivateAccount_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #38
0
            public void AggregateClauseReset()
            {
                _BlogPageCityID_W = null;
                _BlogPageID_W = null;
                _CityID_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #39
0
            public void AggregateClauseReset()
            {
                _MagazineID_W = null;
                _EnTitle_W = null;
                _ArTitle_W = null;
                _FilePath_W = null;
                _CreatedDate_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #40
0
            public void AggregateClauseReset()
            {
                _AttachementID_W = null;
                _DepartementID_W = null;
                _FilePath_W = null;
                _FileName_W = null;
                _Description_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
Пример #41
0
            public void AggregateClauseReset()
            {
                _BranchID_W = null;
                _BranchName_W = null;
                _BranchAddress_W = null;
                _Telephone_W = null;
                _ManagerName_W = null;
                _Duration_Hours_W = null;
                _ImagePath_W = null;
                _GoogleMapLink_W = null;

                this._entity.Query.FlushAggregateParameters();
            }
 public override void AddOrderBy(AggregateParameter aggregate, MyGeneration.dOOdads.WhereParameter.Dir direction)
 {
     base.AddOrderBy("`" + aggregate.Alias + "`", direction);
 }