예제 #1
0
        private void seek()
        {
            String strsql = "SELECT tmp.* FROM" +
                            "(SELECT rownum as num,batchcode,starttime,endtime,decode(state,'0','关闭','1','正常')AS status FROM T_UN_BATCH  ORDER BY batchcode DESC)tmp where tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + "order by tmp.batchcode desc";

            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM T_UN_BATCH").ToString());

            Bind(strsql);
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }
예제 #2
0
        private void seek()
        {
            String strsql = "SELECT tmp.* from(select rownum as num,t.* from (select id ,cigarettename,cigarettecode,mantissa,machineseq from t_produce_sorttrough where state=0 and cigarettetype=10"
                            + "  order by to_number(machineseq))t)tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by tmp.num";
            //MessageBox.Show(strsql);
            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM t_produce_sorttrough where state=0 and cigarettetype=10").ToString());

            Bind(strsql);
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }
예제 #3
0
        private void seek()
        {
            String strsql = "SELECT  cigarettecode,cigarettename,sl from(select t.* ,rownum num from(select cigarettecode,cigarettename,sum(pokenum)sl from t_produce_poke p,t_produce_sorttrough s " +
                            "where p.troughnum=s.troughnum and p.machineseq in(43,44,45)group by cigarettecode,cigarettename order by sl desc)t" +
                            " )tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by tmp.num";
            //MessageBox.Show(strsql);
            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM t_produce_poke p ,t_produce_sorttrough s where p.machineseq in(43,44,45) and p.troughnum=s.troughnum group by cigarettecode,cigarettename").ToString());

            this.
            Bind(strsql);
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }
예제 #4
0
        private void seek()
        {
            String wherecause = "";

            if (comboBox1.SelectedIndex == 0)
            {
                wherecause = "and troughtype=10 and CIGARETTETYPE=20";
            }
            else
            {
                wherecause = "and troughtype=20";
            }
            String strsql = "SELECT tmp.* from(select rownum as num,t.* from (select cigarettename,cigarettecode,mantissa,machineseq,THRESHOLD,BOXCOUNT,clearup,maintissaless from t_produce_sorttrough where state=10 " + wherecause
                            + "  order by to_number(machineseq))t)tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by tmp.num";
            //MessageBox.Show(strsql);
            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM t_produce_sorttrough where state=10 " + wherecause).ToString());

            Bind(strsql);
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }
예제 #5
0
        private void seek()
        {
            // string linenum = this.box_sortline.SelectedValue+"";
            string types = this.box_condition.SelectedValue + "";
            string keywd = this.txt_keywd.Text.Trim();
            String tmp   = "";

            if (types != null && types != "" && keywd != null && keywd != "")
            {
                tmp = " and " + types + " like'%" + keywd + "%'";
            }
            String strsql = "SELECT tmp.* FROM (select rownum as num,t.* from(select  id,linenum,machineseq,troughdesc,'单独道'as troughtype" +
                            ",actcount,cigarettecode,state,cigarettename,decode(cigarettetype,'10','混合','20','正常','异型')as cigarettetype,replenishline,transportationline,decode(state,'0','正常','1','禁用')as status " +
                            "from t_produce_sorttrough t where  cigarettetype='30'" + tmp +
                            " ORDER BY machineseq)t)tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by tmp.num";
            //MessageBox.Show(strsql);
            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM t_produce_sorttrough where 1=1 and cigarettetype='30'" + tmp).ToString());

            Bind(strsql);
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }
예제 #6
0
        private void seek()//显示通道信息
        {
            // string linenum = this.box_sortline.SelectedValue+"";
            string types = this.box_condition.SelectedValue + "";
            string keywd = this.txt_keywd.Text.Trim();
            int    type  = cbtype.SelectedIndex;
            int    ctype = cbctype.SelectedIndex;

            if (ctype == 1)
            {
                ctype = 20;
            }
            else if (ctype == 2)
            {
                ctype = 30;
            }
            else if (ctype == 3)
            {
                ctype = 40;
            }

            if (type == 0)
            {
                type = 10;
            }
            else if (type == 1)
            {
                type = 20;
            }
            else if (type == 2)
            {
                type = 30;
            }
            else if (type == 3)
            {
                type = 40;
            }
            String tmp = "";

            if (types != null && types != "" && keywd != null && keywd != "")
            {
                tmp = " and " + types + " like'%" + keywd + "%'";
            }
            if (type != 0)
            {
                tmp += "and troughtype=" + type;
            }
            if (ctype != 0)
            {
                tmp += "and cigarettetype=" + ctype;
            }
            String strsql = "SELECT tmp.* FROM (select  rownum as num, troughnum,id,machineseq," +
                            "cigarettecode,cigarettename,state,troughtype as type,cigarettetype as ctype,decode(cigarettetype,'10','混合','20','标准','30','异型','异型混合')as cigarettetype,decode(state,'10','正常','0','禁用')as status, " +
                            "decode(troughtype,10,'分拣',20,'重力式货架',30,'皮带机',40,'分拣出口')as troughtypes,groupno from t_produce_sorttrough t where  1=1 " + tmp +
                            " )tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by to_number(tmp.troughnum)";
            String temps = tmp +
                           " ORDER BY troughnum)tmp where  tmp.num>" + (pager1.CurrentPageIndex - 1) * pager1.PageSize + " and tmp.num<=" + pager1.CurrentPageIndex * pager1.PageSize + " order by to_number(tmp.troughnum)";
            //MessageBox.Show(strsql);
            int total = int.Parse(DataPublic.ExecuteScalar("SELECT count(*) FROM t_produce_sorttrough where 1=1 " + tmp).ToString());

            Console.WriteLine(strsql);
            //Db.Open();
            Bind(strsql);
            // Db.Close();
            pager1.RecordCount = total;
            this.pager1.InitPageInfo();
        }