public void BindData()
                  {
                      string FidTemp = Fid.Length < 1 ? ("") : (" and FirstSort='" + Fid + "'");
                      string SidTemp = Sid.Length < 1 ? ("") : (" and SecSort='" + Sid + "'");
                      string TidTemp = Tid.Length < 1 ? ("") : (" and [Sort]='" + Tid + "'");
                      string idKeyWord =  this.GetRequest("idKeyWord").Trim();
                      idKeyWord = idKeyWord.Length>0&&idKeyWord!="請輸入關鍵字"?(" and [CompanyName] like '%"+idKeyWord+"%'"):("");
                      string idProvince = HttpUtility.UrlDecode(this.GetRequest("idProvince"));
                      idProvince = idProvince.Length > 0&&idProvince!="不限" ? (" and [Province] = '" + idProvince + "'") : ("");
                      string idCity = this.GetRequest("idCity");
                      idCity = idCity.Length > 0 &&idCity!="不限"? (" and [City] = '" + idCity + "'") : ("");
                      string idArea = this.GetRequest("idArea");
                      idArea = idArea.Length > 0 &&idArea!="不限"? (" and [Area] ='" + idArea + "'") : ("");
                      string idCoMode = this.GetRequest("idCoMode");
                      idCoMode = idCoMode.Length > 0 && idCoMode != "0" ? (" and [DealType] like '%" + (idCoMode == "1" ? ("生產型") : (idCoMode == "2" ? ("貿易型") : (idCoMode == "3" ? ("服務型") : (idCoMode == "4" ? ("政府或其他機構") : (""))))) + "%'") : ("");
                      string idIsGender = this.GetRequest("idIsGender");
                      idIsGender = idIsGender == "true" ? (" and [Genderid]=1") : ("");

                      this.PageSize = 20;
                      this.Columns = "  [domain],[C_ID],[CompanyName],[Introduce],[DealType],[MainProduct],[Province],[City],[Area],case  [Genderid] when 0 then '/img/mfree.jpg' when 1 then '/img/mvip.jpg' when 2 then '/img/mvip.jpg' end as Genderid,[Scores],[regTime],[regMoney],[PQQ],[PMSN]";
                      this.TableName = "V_CompanysList";
                      this.Where = string.Format(" 1=1{0}{1}{2}{3}{4}{5}{6}{7}{8}", idKeyWord, idProvince, idCity, idArea, idCoMode, idIsGender, FidTemp, SidTemp, TidTemp);
                      this.Order = "Genderid desc,AddTime desc,C_ID desc";
                      this.Pid = "C_ID";
                      this.ResultCount = this.CurrentPage>25?(""):"500";
                      this.Distinct = "distinct";

                      this.Pages1.NumCount= Convert.ToInt32(this.Db.GetOne(string.Format("select count(C_ID) from V_CompanysList where {0}", Where)));
                      this.Pages1.PageSize = this.PageSize;
                      this.Pages1.CurrentPage = this.CurrentPage;

                      this.RRpList.DataSource = this.PageData;
                      this.RRpList.DataBind();
                  }

          posted on 2009-06-22 14:55 sanmao 閱讀(79) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 永善县| 柳州市| 兴城市| 虞城县| 南宁市| 通山县| 睢宁县| 凉城县| 新津县| 萍乡市| 丘北县| 育儿| 光泽县| 涟源市| 馆陶县| 连江县| 彭泽县| 遂溪县| 始兴县| 年辖:市辖区| 黄石市| 河南省| 呼玛县| 西青区| 阳泉市| 威信县| 花垣县| 河西区| 赤水市| 常州市| 宜川县| 内乡县| 靖边县| 南澳县| 博客| 弋阳县| 岑溪市| 汉阴县| 尚志市| 龙门县| 玛多县|