Ejemplo n.º 1
0
        /// <summary>
        /// 获取检查列表
        /// </summary>
        void getUIcheckList()
        {
            string moduleid = this.comboBox1.SelectedValue.ToString();
            string manageid = this.comboBox2.SelectedValue.ToString();
            string state    = this.comboBox3.Text;
            string begin    = this.dateTimePicker1.Value.ToShortDateString() + " 00:00:00";
            string end      = this.dateTimePicker2.Value.ToShortDateString() + " 23:59:59";

            if (this.dateTimePicker1.IsDisposed && this.dateTimePicker2.IsDisposed)
            {
                begin = null;
                end   = null;
            }

            this.count = UICheckDao.QueryUIcheckCount(moduleid, manageid, state, begin, end);
            int countpage = (count % pagesize == 0)?count / pagesize:count / pagesize + 1;

            if (this.currentpage > countpage)
            {
                this.currentpage = 1;
            }
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, countpage, this.count);

            this.listView1.Items.Clear();
            List <UIcheckinfo> allui = UICheckDao.QueryUIcheckinfo(moduleid, manageid, state, begin, end,
                                                                   (currentpage > 1)?((this.currentpage - 1) * pagesize):0
                                                                   , pagesize);

            foreach (UIcheckinfo tu in allui)
            {
                ListViewBing(tu);
            }
        }