Exemple #1
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            UnitSubjectSetStrategyName name = (UnitSubjectSetStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OAComputerMaintenanceStrategyName name = (OAComputerMaintenanceStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #3
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OADocumentWorkFlowActStrategyName name = (OADocumentWorkFlowActStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OAFilePageViewStrategyName name = (OAFilePageViewStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            AttentionStrategyName name = (AttentionStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            PurchaseFlowSelSupplyStrategyName name = (PurchaseFlowSelSupplyStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            TC_OA_BiddingContractStrategyName name = (TC_OA_BiddingContractStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #8
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            SupplierLinkmanStrategyName name = (SupplierLinkmanStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            BiddingDtlAuditingStrategyName name = (BiddingDtlAuditingStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                return("");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #10
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            CostBudgetBackupDtlStrategyName name = (CostBudgetBackupDtlStrategyName)strategy.Name;
            string text2 = "";
            string text3 = "";

            if (strategy.Type != StrategyType.Other)
            {
                return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
            }
            CostBudgetBackupDtlStrategyName name2 = name;

            if (name2 != CostBudgetBackupDtlStrategyName.False)
            {
                if (name2 != CostBudgetBackupDtlStrategyName.CostCodeIn)
                {
                    if (name2 != CostBudgetBackupDtlStrategyName.GroupCodeEx)
                    {
                        return(text3);
                    }
                    string systemGroupCode = strategy.GetParameter(0);
                    string parameter       = strategy.GetParameter(1);
                    if (parameter == null)
                    {
                        return(text3);
                    }
                    if (parameter != "0")
                    {
                        if (parameter != "1")
                        {
                            if (parameter != "2")
                            {
                                return(text3);
                            }
                            return(SystemGroupStrategyBuilder.BuildTreeNodeSearchString(systemGroupCode, TreeNodeSearchType.AllSubNotLeafNode, SystemClassDescription.GetItemTypeColumnName("CostBudgetSet")));
                        }
                    }
                    else
                    {
                        return(SystemGroupStrategyBuilder.BuildTreeNodeSearchString(systemGroupCode, TreeNodeSearchType.AllSubNodeIncludeSelf, SystemClassDescription.GetItemTypeColumnName("CostBudgetSet")));
                    }
                    return(SystemGroupStrategyBuilder.BuildTreeNodeSearchString(systemGroupCode, TreeNodeSearchType.AllSubLeafNode, SystemClassDescription.GetItemTypeColumnName("CostBudgetSet")));
                }
                text2 = StrategyConvert.BuildInStr(strategy.GetParameter(0));
                if (text2 != "")
                {
                    text3 = string.Format(" CostCode in ({0}) ", text2);
                }
                return(text3);
            }
            return("1=2");
        }
Exemple #11
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            RoomStrategyName name  = (RoomStrategyName)strategy.Name;
            string           text2 = "";
            string           text3 = "";

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case RoomStrategyName.InBuildingCode:
                    text2 = StrategyConvert.BuildInStr(strategy.GetParameter(0));
                    if (text2 != "")
                    {
                        text3 = string.Format(" BuildingCode in ({0}) ", text2);
                    }
                    return(text3);

                case RoomStrategyName.OutAspect:
                case RoomStrategyName.InOutAspect:
                    return(text3);

                case RoomStrategyName.InvState:
                    return(string.Format("isnull(InvState,'') ='{0}' ", strategy.GetParameter(0).Trim()));

                case RoomStrategyName.InInvState:
                    text2 = StrategyConvert.BuildInStr(strategy.GetParameter(0));
                    if (text2 != "")
                    {
                        text3 = string.Format(" isnull(InvState, '') in ({0}) ", text2);
                    }
                    return(text3);

                case RoomStrategyName.OutState:
                    return(string.Format("isnull(OutState,'') ='{0}' ", strategy.GetParameter(0).Trim()));

                case RoomStrategyName.SalState:
                    return(string.Format("isnull(SalState,'') ='{0}' ", strategy.GetParameter(0).Trim()));

                case RoomStrategyName.False:
                    return("1=2");

                case RoomStrategyName.PBSTypeCodeAllChild:
                    return(string.Format("(PBSTypeCode = '{0}' or PBSTypeFullID like '{0}-%')", strategy.GetParameter(0).Trim()));

                case RoomStrategyName.OutListCode:
                    return(string.Format("exists(select 1 from TempRoomStructure t where t.TempRoomCode = a.RoomCode and t.OutListCode = '{0}')", strategy.GetParameter(0).Trim()));
                }
                return(text3);
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #12
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            WBSStrategyName name = (WBSStrategyName)strategy.Name;
            string          text = "";

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case WBSStrategyName.UserAccess:
                    return(string.Format(" WBSCode in ( select WBSCode from TaskPerson where UserCode='{0}' and Type in (0, 1, 2, 4, 9)  ) ", strategy.GetParameter(0)));

                case WBSStrategyName.PlannedStartDate:
                case WBSStrategyName.PlannedFinishDate:
                case WBSStrategyName.ActualStartDate:
                case WBSStrategyName.ActualFinishDate:
                case WBSStrategyName.Status:
                    return(text);

                case WBSStrategyName.StatusNot:
                    return(string.Format(" Status not in  ({0})", strategy.GetParameter(0)));

                case WBSStrategyName.PreStatusNot:
                    return(string.Format(" PreStatus != '{0}' ", strategy.GetParameter(0)));

                case WBSStrategyName.Master:
                    return(string.Format(" WBSCode in ( select A.WBSCode  from TaskPerson A,SystemUser B where A.UserCode =B.UserCode and B.UserName like '%{0}%')", strategy.GetParameter(0)));

                case WBSStrategyName.FullCode:
                    return(string.Format(" FullCode like '%{0}%' ", strategy.GetParameter(0)));

                case WBSStrategyName.RelatedUser:
                    return(string.Format("WBSCode in ( select WBSCode from TaskPerson where UserCode='{0}') ", strategy.GetParameter(0)));

                case WBSStrategyName.AccessRange:
                    if (strategy.GetParameterCount() <= 2)
                    {
                        return(GetFullCode(strategy.GetParameter(1)));
                    }
                    return(GetFullCode(strategy.GetParameter(1), strategy.GetParameter(2)));

                case WBSStrategyName.AllChild:
                    return(string.Format(" FullCode like '{0}-%' ", strategy.GetParameter(0)));

                case WBSStrategyName.WBSCodeIn:
                    return(string.Format(" WBSCode in ({0}) ", strategy.GetParameter(0)));
                }
                return(text);
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #13
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            EnquiryStrategyName name = (EnquiryStrategyName)strategy.Name;
            string text = "";

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case EnquiryStrategyName.SupplierName:
                {
                    string parameter = strategy.GetParameter(0);
                    return(string.Format(" suppliercode in  ( select suppliercode  from supplier where SupplierName like '%{0}%')", parameter));
                }

                case EnquiryStrategyName.SupplierCode:
                case EnquiryStrategyName.ReplayPerson:
                case EnquiryStrategyName.EnquiryDate:
                    return(text);

                case EnquiryStrategyName.EnquiryPerson:
                {
                    string text4 = strategy.GetParameter(0);
                    return(string.Format(" EnquiryPerson in  ( select userid from systemuser where UserName like '%{0}%')", text4));
                }

                case EnquiryStrategyName.Status:
                    if (strategy.GetParameter(0) != "0")
                    {
                        return(" ReplayDate is not null");
                    }
                    return(" ReplayDate is null ");

                case EnquiryStrategyName.AccessRange:
                {
                    string text2 = " select purchaseCode from purchase where ";
                    text2 = text2 + AccessRanggeQuery.BuildAccessRangeString(strategy.GetParameter(0), strategy.GetParameter(1), strategy.GetParameter(2), "Purchase", "PurchaseCode", "ClassType", "CreatePerson");
                    return(" PurchaseCode in (" + text2 + ")");
                }

                case EnquiryStrategyName.SingleAccess:
                {
                    string text6 = strategy.GetParameter(0);
                    return(string.Format(" EnquiryPerson = '{0}'", text6));
                }
                }
                return(text);
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            TaskBudgetStrategyName name = (TaskBudgetStrategyName)strategy.Name;
            string text = "";

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case TaskBudgetStrategyName.WBSCodeEx:
                {
                    string wbsCode = strategy.GetParameter(0);
                    switch (strategy.GetParameter(1))
                    {
                    case "0":
                        return(WBSStrategyBuilder.BuildTreeNodeSearchString(wbsCode, TreeNodeSearchType.AllSubNodeIncludeSelf));

                    case "1":
                        return(WBSStrategyBuilder.BuildTreeNodeSearchString(wbsCode, TreeNodeSearchType.AllSubLeafNode));

                    case "2":
                        return(WBSStrategyBuilder.BuildTreeNodeSearchString(wbsCode, TreeNodeSearchType.AllSubNotLeafNode));
                    }
                    return(text);
                }

                case TaskBudgetStrategyName.CostCode:
                    return(text);

                case TaskBudgetStrategyName.CostCodeEx:
                {
                    string costCode = strategy.GetParameter(0);
                    switch (strategy.GetParameter(1))
                    {
                    case "0":
                        return(CBSStrategyBuilder.BuildTreeNodeSearchString(costCode, TreeNodeSearchType.AllSubNodeIncludeSelf));

                    case "1":
                        return(CBSStrategyBuilder.BuildTreeNodeSearchString(costCode, TreeNodeSearchType.AllSubLeafNode));

                    case "2":
                        return(CBSStrategyBuilder.BuildTreeNodeSearchString(costCode, TreeNodeSearchType.AllSubNotLeafNode));
                    }
                    return(text);
                }
                }
                return(text);
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            PaymentItemBuildingStrategyName name = (PaymentItemBuildingStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case PaymentItemBuildingStrategyName.ProjectCode:
                    return("");
                }
                return(string.Format(" exists (select 1 from Payment where PaymentCode=Payment.PaymentCode and ProjectCode ='{0}' ) ", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OAVehicleInfoStrategyName name = (OAVehicleInfoStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case OAVehicleInfoStrategyName.AccessRange:
                    return("");
                }
                return(string.Format("{0}", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #17
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            SalBudgetDtlStrategyName name = (SalBudgetDtlStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case SalBudgetDtlStrategyName.False:
                    return("");
                }
                return("1=2");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            BiddingGradeStrategyName name = (BiddingGradeStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case BiddingGradeStrategyName.BiddingGradeMessageCode:
                    return("");
                }
                return(string.Format(" BiddingGradeMessageCode in ({0})", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            SalPayPlanStrategyName name = (SalPayPlanStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case SalPayPlanStrategyName.SalPayCode:
                    return("");
                }
                return(string.Format(" exists(select * from SalPayRela where PayPlanCode = a.PayPlanCode and PayCode = '{0}')", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #20
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            PBSUnitStrategyName name = (PBSUnitStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case PBSUnitStrategyName.PBSUnitCodeNot:
                    return("");
                }
                return(string.Format("PBSUnitCode <> '{0}'", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #21
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OADIARYStrategyName name = (OADIARYStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case OADIARYStrategyName.AccessRange:
                    return("");
                }
                return(AccessRanggeQuery.BuildAccessRangeString(strategy.GetParameter(0), strategy.GetParameter(1), strategy.GetParameter(2), "OADIARY", "MasterCode", "UserCode"));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            DictionaryItemStrategyName name = (DictionaryItemStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case DictionaryItemStrategyName.False:
                    return("");
                }
                return("1=2");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            TaskExecuteRiskStrategyName name = (TaskExecuteRiskStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case TaskExecuteRiskStrategyName.False:
                    return("");
                }
                return("1=2");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OAREGULATIONStrategyName name = (OAREGULATIONStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case OAREGULATIONStrategyName.OAREGULATIONCODE:
                    return("");
                }
                return(string.Format(" ( (select count(*) from noticeUser where NoticeUser.NoticeCode=Notice.NoticeCode)  = 0 or ( exists ( select * from noticeUser where NoticeUser.NoticeCode=Notice.NoticeCode and NoticeObject='{0}' ))) ", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #25
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            AttrSetStrategyName name = (AttrSetStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case AttrSetStrategyName.AttrSetCodeIn:
                    return("");
                }
                return(string.Format(" AttrSetCode in ( {0} )", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            GuidStrategyName name = (GuidStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                //switch (name)
                //{
                //    case GuidStrategyName.AccessRange:
                //        return "";
                //}
                return(AccessRanggeQuery.BuildAccessRangeString(strategy.GetParameter(0), strategy.GetParameter(1), strategy.GetParameter(2), "taskGuid", "taskGuidCode"));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            OAEquipmentUseStrategyName name = (OAEquipmentUseStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case OAEquipmentUseStrategyName.OARequipmentUseCode:
                    return("");
                }
                return(string.Format("{0}", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            ConstructProgressRiskStrategyName name = (ConstructProgressRiskStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case ConstructProgressRiskStrategyName.False:
                    return("");
                }
                return("1=2");
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
Exemple #29
0
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            CostStrategyName name = (CostStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                switch (name)
                {
                case CostStrategyName.Deep:
                    return("");
                }
                return(string.Format(" CostCode in ( select CostCode from CBS where Deep={0} ) ", strategy.GetParameter(0)));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }
        public override string BuildSingleStrategyString(Strategy strategy)
        {
            BiddingReturnStrategyName name = (BiddingReturnStrategyName)strategy.Name;

            if (strategy.Type == StrategyType.Other)
            {
                //switch (name)
                //{
                //    case BiddingReturnStrategyName.BiddingCode:
                //        return "";
                //}
                return(string.Format(" BiddingEmitCode in (select BiddingEmitCode from BiddingEmit where BiddingCode='{0}')", strategy.GetParameter(0).Trim()));
            }
            return(StandardStrategyStringBuilder.BuildStrategyString(strategy));
        }