Пример #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string gid      = this.TextBox1.Text;
            string roomid   = this.TextBox2.Text;
            string gname    = this.TextBox3.Text;
            string pid      = this.TextBox4.Text;
            string tel      = this.TextBox5.Text;
            string livetime = this.TextBox6.Text;

            if (this.TextBox1.Text != "" && roomid == "" && gname == "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Gid(gid, "record");
                this.GridView1.DataBind();
            }
            else if (this.TextBox1.Text == "" && roomid != "" && gname == "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Roomid(roomid, "record");
                this.GridView1.DataBind();
            }

            else if (this.TextBox1.Text == "" && roomid == "" && gname != "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Gname(gname, "record");
                this.GridView1.DataBind();
            }
            else if (this.TextBox1.Text == "" && roomid == "" && gname == "" && pid != "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Idcard(pid, "record");
                this.GridView1.DataBind();
            }

            else if (this.TextBox1.Text == "" && roomid == "" && gname == "" && pid == "" && tel != "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Tel(tel, "record");
                this.GridView1.DataBind();
            }
            else if (this.TextBox1.Text == "" && roomid == "" && gname == "" && pid == "" && tel == "" && livetime != "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_LiveTime(livetime, "record");
                this.GridView1.DataBind();
            }

            else
            {
                bind();
            }
        }
Пример #2
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string gid      = this.txtGid.Text;
            string roomid   = this.RoomId.Text;
            string gname    = this.txtGname.Text;
            string pid      = this.txtPid.Text;
            string tel      = this.txtMobile.Text;
            string livetime = this.InTime.Text;

            if (this.txtGid.Text != "" && roomid == "" && gname == "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Gid(gid, "record");
                this.GridView1.DataBind();
            }
            else if (this.txtGid.Text == "" && roomid != "" && gname == "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Roomid(roomid, "record");
                this.GridView1.DataBind();
            }

            else if (this.txtGid.Text == "" && roomid == "" && gname != "" && pid == "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Gname(gname, "record");
                this.GridView1.DataBind();
            }
            else if (this.txtGid.Text == "" && roomid == "" && gname == "" && pid != "" && tel == "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Idcard(pid, "record");
                this.GridView1.DataBind();
            }

            else if (this.txtGid.Text == "" && roomid == "" && gname == "" && pid == "" && tel != "" && livetime == "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_Tel(tel, "record");
                this.GridView1.DataBind();
            }
            else if (this.txtGid.Text == "" && roomid == "" && gname == "" && pid == "" && tel == "" && livetime != "")
            {
                this.GridView1.DataSource = BLL_Hotel.Cha_LiveTime(livetime, "record");
                this.GridView1.DataBind();
            }

            else
            {
                bind();
            }
        }