Beispiel #1
0
        private void btnSure_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("查询信息不能为空!");
                return;
            }
            parkQueryArgs.park1 = textBox1.Text;
            parkQueryArgs.park2 = textBox2.Text;
            parkQueryArgs.park3 = textBox3.Text;
            parkQueryArgs.park4 = textBox4.Text;
            OnParkQuery(null, parkQueryArgs);

            xtra = this.Parent.Parent.Parent.Parent.Parent as DevExpress.XtraTab.XtraTabControl;
            if (!this.isExistPage("照片查看"))
            {
                string        Queryfactor = "%" + parkQueryArgs.park1 + "%" + parkQueryArgs.park2 + "%" + parkQueryArgs.park3 + "%" + parkQueryArgs.park4 + "%";
                CarPhotosView carphotos   = new CarPhotosView(dtPic, 4, Queryfactor, null);
                this.ShowPage("照片查看", carphotos);
            }
            else
            {
                for (int i = 0; i < xtra.TabPages.Count; i++)
                {
                    if (xtra.TabPages[i].Name == "照片查看")
                    {
                        xtra.TabPages.Remove(xtra.TabPages[i]);
                        string        Queryfactor = "%" + parkQueryArgs.park1 + "%" + parkQueryArgs.park2 + "%" + parkQueryArgs.park3 + "%" + parkQueryArgs.park4 + "%";
                        CarPhotosView carphotos   = new CarPhotosView(dtPic, 4, Queryfactor, null);
                        this.ShowPage("照片查看", carphotos);
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        private void btnSure_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("查询信息不能为空!");
                return;
            }
            fastQueryArgs.Fast1 = textBox1.Text;
            fastQueryArgs.Fast2 = textBox2.Text;
            fastQueryArgs.Fast3 = textBox3.Text;
            fastQueryArgs.Fast4 = textBox4.Text;
            fastQueryArgs.Fast5 = textBox5.Text;
            OnFastQuery(null, fastQueryArgs);

            xtra = this.Parent.Parent.Parent.Parent.Parent as DevExpress.XtraTab.XtraTabControl;
            if (!this.isExistPage("照片查看"))
            {
                string        Queryfactor = fastQueryArgs.Fast1 + fastQueryArgs.Fast2 + fastQueryArgs.Fast3 + fastQueryArgs.Fast4 + fastQueryArgs.Fast5;
                List <object> QueryList   = new List <object>()
                {
                    fastQueryArgs.Fast1, fastQueryArgs.Fast2, fastQueryArgs.Fast3, fastQueryArgs.Fast4, fastQueryArgs.Fast5
                };
                CarPhotosView carphotos = new CarPhotosView(dtPic, 1, Queryfactor, QueryList);
                this.ShowPage("照片查看", carphotos);
            }
            else
            {
                for (int i = 0; i < xtra.TabPages.Count; i++)
                {
                    if (xtra.TabPages[i].Name == "照片查看")
                    {
                        xtra.TabPages.Remove(xtra.TabPages[i]);
                        string        Queryfactor = fastQueryArgs.Fast1 + fastQueryArgs.Fast2 + fastQueryArgs.Fast3 + fastQueryArgs.Fast4 + fastQueryArgs.Fast5;
                        List <object> QueryList   = new List <object>()
                        {
                            fastQueryArgs.Fast1, fastQueryArgs.Fast2, fastQueryArgs.Fast3, fastQueryArgs.Fast4, fastQueryArgs.Fast5
                        };
                        CarPhotosView carphotos = new CarPhotosView(dtPic, 1, Queryfactor, QueryList);
                        this.ShowPage("照片查看", carphotos);
                        break;
                    }
                }
            }
        }
Beispiel #3
0
        private void btnSure_Click(object sender, EventArgs e)
        {
            //string licenec = textBox1.Text + textBox2.Text + textBox3.Text + textBox4.Text + textBox5.Text;
            if (textBox1.Text == "")
            {
                MessageBox.Show("查询信息不能为空!");
                return;
            }
            licenecArgs.Lice1 = textBox1.Text;
            licenecArgs.Lice2 = textBox2.Text;
            licenecArgs.Lice3 = textBox3.Text;
            licenecArgs.Lice4 = textBox4.Text;
            licenecArgs.Lice5 = textBox5.Text;
            OnLicenceQuery(null, licenecArgs);

            xtra = this.Parent.Parent.Parent.Parent.Parent as DevExpress.XtraTab.XtraTabControl;
            if (!this.isExistPage("照片查看"))
            {
                string        Queryfactor = "%" + licenecArgs.Lice1 + "%" + licenecArgs.Lice2 + "%" + licenecArgs.Lice3 + "%" + licenecArgs.Lice4 + "%" + licenecArgs.Lice5 + "%";
                CarPhotosView carphotos   = new CarPhotosView(dtPic, 2, Queryfactor, null);
                this.ShowPage("照片查看", carphotos);
            }
            else
            {
                for (int i = 0; i < xtra.TabPages.Count; i++)
                {
                    if (xtra.TabPages[i].Name == "照片查看")
                    {
                        xtra.TabPages.Remove(xtra.TabPages[i]);
                        string        Queryfactor = "%" + licenecArgs.Lice1 + "%" + licenecArgs.Lice2 + "%" + licenecArgs.Lice3 + "%" + licenecArgs.Lice4 + "%" + licenecArgs.Lice5 + "%";
                        CarPhotosView carphotos   = new CarPhotosView(dtPic, 2, Queryfactor, null);
                        this.ShowPage("照片查看", carphotos);
                        break;
                    }
                }
            }
        }
Beispiel #4
0
        private void btnSure_Click(object sender, EventArgs e)
        {
            timeQueryArgs.floorList = floorList;
            timeQueryArgs.timeList  = timeList;
            if (floorList.Count == 0 && timeList.Count == 0)
            {
                MessageBox.Show("楼层与时间必须同时选择!");
                return;
            }
            OnTimeQury(null, timeQueryArgs);


            string        Queryfactor = @"select res.* from 
                            (select row_number() over() rownumber,* 
                                from vt_park 
                                where  ";
            List <object> list        = new List <object>();

            if (floorList.Count > 0)
            {
                Queryfactor = Queryfactor + " ( ";
                for (int i = 0; i < floorList.Count; i++)
                {
                    Queryfactor = Queryfactor + " floor_id=:" + (i + 1).ToString() + " or ";
                    list.Add(floorList[i]);
                }
                Queryfactor = Queryfactor.Substring(0, Queryfactor.Length - 3) + " ) ";
            }
            if (floorList.Count > 0 && timeList.Count > 0)
            {
                Queryfactor = Queryfactor + " and  ";
            }
            if (timeList.Count > 0)
            {
                Queryfactor = Queryfactor + "  ( ";
                for (int j = 0; j < timeList.Count; j++)
                {
                    Queryfactor = Queryfactor + " to_char(in_park_date, 'HH24')=:" + (floorList.Count + j + 1).ToString() + " or ";
                    list.Add(timeList[j]);
                }
                Queryfactor = Queryfactor.Substring(0, Queryfactor.Length - 3) + " ) ";
            }

            Queryfactor = Queryfactor + ") res where  rownumber BETWEEN :" + (floorList.Count + timeList.Count + 1).ToString() + " and :" + (floorList.Count + timeList.Count + 2).ToString();
            list.Add(1);
            list.Add(4);

            xtra = this.Parent.Parent.Parent.Parent.Parent as DevExpress.XtraTab.XtraTabControl;
            if (!this.isExistPage("照片查看"))
            {
                CarPhotosView carphotos = new CarPhotosView(dtPic, 3, Queryfactor, list);
                this.ShowPage("照片查看", carphotos);
            }
            else
            {
                for (int i = 0; i < xtra.TabPages.Count; i++)
                {
                    if (xtra.TabPages[i].Name == "照片查看")
                    {
                        CarPhotosView carphotos = new CarPhotosView(dtPic, 3, Queryfactor, list);
                        this.ShowPage("照片查看", carphotos);
                        break;
                    }
                }
            }
        }