コード例 #1
0
ファイル: DocumentSearch.ascx.cs プロジェクト: riyuexing/rms
        /// <summary>
        /// 添加查询条件
        /// </summary>
        /// <param name="ssb"></param>
        public void AddSearch(Rms.ORMap.StandardQueryStringBuilder ssb)
        {
            string CreateDate_begin = this.dtCreateDate_begin.Value.Trim();
            string CreateDate_end   = this.dtCreateDate_end.Value.Trim();
            string ModifyDate_begin = this.dtModifyDate_begin.Value.Trim();
            string ModifyDate_end   = this.dtModifyDate_end.Value.Trim();
            string title            = this.txtSearchTitle.Value.Trim();
            string DocumentID       = this.txtSearchDocumentID.Value.Trim();
            string author           = this.txtSearchAuthor.Value.Trim();
            string CreatePerson     = this.ucCreatePerson.Value.Trim();
            string ModifyPerson     = this.ucModifyPerson.Value.Trim();

            string FixedType = this.sltFixedType.Value.Trim();
            string Code      = this.txtCode.Value.Trim();

            ArrayList ar = new ArrayList();

            ar.Add(CreateDate_begin);
            ar.Add(CreateDate_end);

            ArrayList ar2 = new ArrayList();

            ar2.Add(ModifyDate_begin);
            ar2.Add(ModifyDate_end);

            ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.CreateDateRange, ar));
            ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.ModifyDateRange, ar2));

            if (title.Length > 0)
            {
                ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.Title, title));
            }
            if (DocumentID.Length > 0)
            {
                ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.DocumentID, DocumentID));
            }
            if (author.Length > 0)
            {
                ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.Author, author));
            }
            if (CreatePerson.Length > 0)
            {
                ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.CreatePerson, CreatePerson));
            }
            if (ModifyPerson.Length > 0)
            {
                ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.ModifyPerson, ModifyPerson));
            }

            if (Code.Length > 0)
            {
                if (FixedType.Length > 0)
                {
                    ArrayList arTmp = new ArrayList();
                    arTmp.Add(FixedType);
                    arTmp.Add(Code);
                    ssb.AddStrategy(new Strategy(DAL.QueryStrategy.DocumentStrategyName.RelationKey, arTmp));
                }
                else
                {
//					ssb.AddStrategy( new Strategy(DAL.QueryStrategy.DocumentStrategyName.Code, Code));
                }
            }
        }
コード例 #2
0
ファイル: SearchRoomAll.ascx.cs プロジェクト: ishui/rms2
        /// <summary>
        /// 添加查询条件
        /// </summary>
        /// <param name="ssb"></param>
        public void AddSearch(Rms.ORMap.StandardQueryStringBuilder sb)
        {
            string ProjectCode = this.txtProjectCode.Value;

            if (ProjectCode != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InProjectCode, ProjectCode));
            }

            string JgYear = this.dtJgYear.Text;

            if (JgYear != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.JgYear, JgYear));
            }

            string BuildingName = this.txtSearchBuildingName.Value;

            if (BuildingName != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InBuildingName, BuildingName, "F"));
            }

            string ChamberName = this.txtSearchChamberName.Value;

            if (ChamberName != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InChamberName, ChamberName, "F"));
            }

            string RoomName = this.txtSearchRoomName.Value;

            if (RoomName != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InRoomName, RoomName));
            }

            string PBSTypeCode = this.sltSearchPBSTypeCode.Value;

            if (PBSTypeCode != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.PBSTypeCodeAllChild, PBSTypeCode));
            }

//			string ModelCode = this.sltSearchModelCode.Value;
//			if (ModelCode != "")
//				sb.AddStrategy(new Strategy(RoomStrategyName.ModelCode, ModelCode));

            string OutAspect = this.txtSearchOutAspect.Value;

            if (OutAspect != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InOutAspect, OutAspect, "F"));
            }

            string InvestType = this.txtSearchInvestType.Value;

            if (InvestType != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InInvestType, InvestType, "F"));
            }

            string UseType = this.txtSearchUseType.Value;

            if (UseType != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InUseType, UseType, "F"));
            }

            if (this.txtIFloorCountBegin.Text != "" || this.txtIFloorCountEnd.Text != "")
            {
                ArrayList ar = new ArrayList();
                ar.Add((this.txtIFloorCountBegin.Text == "")?"":this.txtIFloorCountBegin.ValueDecimal.ToString());
                ar.Add((this.txtIFloorCountEnd.Text == "")?"":this.txtIFloorCountEnd.ValueDecimal.ToString());
                sb.AddStrategy(new Strategy(RoomStrategyName.IFloorCount, ar));
            }

            string InvState = this.sltSearchInvState.Value;

            if (InvState != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.InInvState, InvState));
            }

            string OutState = this.sltSearchOutState.Value;

            if (OutState != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.OutState, OutState));
            }

            if (this.dtSearchInDateBegin.Value != "" || this.dtSearchInDateEnd.Value != "")
            {
                ArrayList ar = new ArrayList();
                ar.Add(this.dtSearchInDateBegin.Value);
                ar.Add(this.dtSearchInDateEnd.Value);
                sb.AddStrategy(new Strategy(RoomStrategyName.InDateRange, ar));
            }

            if (this.dtSearchOutDateBegin.Value != "" || this.dtSearchOutDateEnd.Value != "")
            {
                ArrayList ar = new ArrayList();
                ar.Add(this.dtSearchOutDateBegin.Value);
                ar.Add(this.dtSearchOutDateEnd.Value);
                sb.AddStrategy(new Strategy(RoomStrategyName.OutDateRange, ar));
            }

            string SalState = this.sltSearchSalState.Value;

            if (SalState != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.SalState, SalState));
            }

            if (this.sltSearchBofangType.Value.Trim() != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.BofangType, this.sltSearchBofangType.Value.Trim()));
            }

            if (this.dtSearchBofangYear.Text.Trim() != "")
            {
                sb.AddStrategy(new Strategy(RoomStrategyName.BofangYear, this.dtSearchBofangYear.Text.Trim()));
            }

            if (this.txtSearchBofangSnoBegin.Text != "" || this.txtSearchBofangSnoEnd.Text != "")
            {
                ArrayList ar = new ArrayList();
                ar.Add((this.txtSearchBofangSnoBegin.Text == "")?"":this.txtSearchBofangSnoBegin.ValueDecimal.ToString());
                ar.Add((this.txtSearchBofangSnoEnd.Text == "")?"":this.txtSearchBofangSnoEnd.ValueDecimal.ToString());
                sb.AddStrategy(new Strategy(RoomStrategyName.BofangSnoRange, ar));
            }
        }