<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      using System;
      using System.Data;
      namespace cosvote
      {
       /// 
       /// page_size_ct 的摘要說明。
       /// 
       public class page_size_ct
       {
        public page_size_ct()
        {
         //
         // TODO: 在此處添加構(gòu)造函數(shù)邏輯
         //
        }
        int page_size;//頁(yè)尺寸
        int orderby_tag;//排序方式(0為asc,1為desc)
        string tb_name; //表名
        string field_list; //字段列表
        int page_no=0;//頁(yè)碼
        string condition_str;//條件字段串(不加where)
        string primary_key;// 主鍵(必須而且要自動(dòng)編號(hào)無重復(fù))
      
        public int pagesize  //pagesize 屬性
        {
         set
         {
          page_size=value;
         }
         get
         {
          return(page_size);
         }
        }
        public int orderbytag  //排序標(biāo)志 屬性(0為正序1為倒序)
        {
         set
         {
          orderby_tag=value;
         }
         get
         {
          return(orderby_tag);
         }
        }
      
        public string tbname  //表名 屬性
        {
         set
         {
          tb_name=value;
         }
         get
         {
          return(tb_name);
         }
        }
        public string fieldlist  //字段列表 屬性
        {
         set
         {
          field_list=value;
         }
         get
         {
          return(field_list);
         }
        }
      
        public int pageno  //頁(yè)碼 屬性
        {
         set
         {
          if (value!=0)
          {
           page_no=value;
          }
          else
           page_no=1;
          
         }
         get
         {
          return(page_no);
         }
        }
      
        public string condition  //條件 屬性
        {
         set
         {
          condition_str=value;
         }
         get
         {
          return(condition_str);
         }
        }
      
        public string primarykey  //關(guān)鍵字 屬性
        {
         set
         {
          primary_key=value;
         }
         get
         {
          return(primary_key);
         }
        }
        
        //組合查詢語(yǔ)句
        public System.Data.DataTable page_tb()
        {
         string condition_tag;  //存放按最大ID或最小ID查詢
         string orderbystr;     //存放orderby字符串
         string strsql;         //組合后的查詢字符串
         if (this.orderbytag==0)
         {
          
          condition_tag=" > (select max("+ this.primarykey +") from ( select top ";
          orderbystr=" order by "+ this.primarykey + " asc ";
         }
         else
         {
          condition_tag=" < ( select min("+ this.primarykey +") from (select top ";
          orderbystr=" order by "+ this.primarykey +" desc ";
         }
         if (this.pageno==1) 
         {
          if (this.condition=="")
          {
           strsql="Select top "+ this.pagesize +" " + this.fieldlist + " from "+ this.tbname + orderbystr;
          }
          else
          {
           strsql="Select top "+ this.pagesize +" " + this.fieldlist + " from "+ this.tbname ;
           strsql+=" where "+ this.condition + orderbystr;
          }
          
         }
         else
         {
          if (this.condition=="")
          {
         
           strsql="Select top "+ this.pagesize +" " + this.fieldlist + " from "+ this.tbname ;
           strsql+=" where "+ this.primarykey + condition_tag +((this.pageno -1)*this.pagesize) + " "+this.primarykey +" from " + this.tbname;
           strsql+= orderbystr+ ") as maxid )" + orderbystr;
          }
          else
          {
           strsql="Select top "+ this.pagesize +" " + this.fieldlist + " from "+ this.tbname ;
           strsql+=" where ( "+ this.primarykey + condition_tag +((this.pageno -1)*this.pagesize) + " "+ this.primarykey +" from " + this.tbname;
           strsql+=" where "+ this.condition +" " + orderbystr+ ") as maxid )" + " ) and ( " +this.condition + " )"+orderbystr;
          }
         }
         getconnect conn=new getconnect();
         conn.openconn();
         DataSet ds=new DataSet();
         try
         {
          
          System.Data.SqlClient.SqlDataAdapter adp=new System.Data.SqlClient.SqlDataAdapter(strsql,conn.conn);
          adp.Fill(ds);
          return(ds.Tables[0]);
         }
         catch (Exception e)
         {
          System.Web.HttpContext.Current.Response.Write (e.Message);
          conn.closeconn();
          return(new DataTable());
         }
         finally
         {
          conn.closeconn();
         }
        }
      
        //返回總行數(shù)
        public long recordcount()
        {
         string strsql;
         if (this.condition.ToString()!="")
         {
          strsql="Select Count(" + this.primarykey +")  as counts from "+ this.tbname + " where " + this.condition.ToString() ;
         }
         else
         {
          strsql="Select Count(" + this.primarykey +")  as counts from "+ this.tbname ;
         }
         getconnect conn=new getconnect();
         conn.openconn();
         System.Data.SqlClient.SqlCommand cmd=new  System.Data.SqlClient.SqlCommand();
         cmd.CommandText=strsql;
         cmd.Connection=conn.conn;
         System.Data.SqlClient.SqlDataReader rd;
         try
         {
          rd= cmd.ExecuteReader();
          if (rd.HasRows==true)
          {
           rd.Read();
           return(long.Parse(rd["counts"].ToString()));
          }
          else
          {
             return(0);
          }
         }
         catch (Exception e)
         {
          System.Web.HttpContext.Current.Response.Write (e.Message);
          conn.closeconn();
          cmd.Dispose();
          return(0);
         }
         finally
         {
          conn.closeconn();
         }
        }
       }
      }
      
      posted on 2009-12-09 21:31  kuibono  閱讀(921)  評(píng)論(0)    收藏  舉報(bào)

      愛造人 | 快播影視
      主站蜘蛛池模板: 国产精品人成视频免| 秋霞电影网| XXXXXHD亚洲日本HD| 爆乳2把你榨干哦ova在线观看| 色猫咪av在线观看| 日韩无人区码卡1卡2卡| 天天做天天爱夜夜爽女人爽| 三级国产在线观看| 国产成人亚洲精品在线看| 国产午夜精品久久精品电影| 久久精品国产亚洲av麻| 国产精品中出一区二区三区| 亚洲中文字幕无码av永久| 亚洲国产精品无码久久电影| 色老头在线一区二区三区| 99久久99久久精品免费看蜜桃| 97精品伊人久久久大香线蕉| 国产粉嫩学生高清专区麻豆| 欧美肥老太交视频免费 | 999福利激情视频| 老色鬼在线精品视频在线观看 | 亚洲中文字幕伊人久久无码| 精品亚洲国产成人av制服| 久久99国产精品尤物| 成人网站av亚洲国产| 最新亚洲av日韩av二区| www插插插无码免费视频网站| 最新国产精品好看的精品| 高清偷拍一区二区三区| 藁城市| 国产在线拍揄自揄拍无码| 成人又黄又爽又色的视频| 人妻中文字幕不卡精品| 精品无码国产一区二区三区AV| 亚洲午夜福利AV一区二区无码| 午夜射精日本三级| 精品黄色av一区二区三区 | 精品国产污污免费网站入口| 强奷漂亮人妻系列老师| 国产在线拍揄自揄拍无码视频| 国产最大的福利精品自拍|