예제 #1
0
        public void bind()
        {
            DataTable dt = BLL_Hotel.Cha_CusFenYe(1);

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();
            hehe();
        }
예제 #2
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            if (this.Label1.Text == "Gid")
            {
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "$('.tcdPageCode').createPage({pageCount:" + this.TextBox3.Text + ",current:" + this.TextBox7.Text + "});", true);
                int       hehe = Convert.ToInt32(this.TextBox7.Text);
                DataTable dt   = BLL_Hotel.Cha_GuestInfoByGid(Convert.ToInt32(this.TextBox1.Text), hehe);
                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }

            else if (this.Label1.Text == "Gname")
            {
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "$('.tcdPageCode').createPage({pageCount:" + this.TextBox3.Text + ",current:" + this.TextBox7.Text + "});", true);
                int       hehe = Convert.ToInt32(this.TextBox7.Text);
                DataTable dt   = BLL_Hotel.Cha_GuestInfoByGname(this.TextBox2.Text, hehe);
                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }
            else if (this.Label1.Text == "Mobile")
            {
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "$('.tcdPageCode').createPage({pageCount:" + this.TextBox3.Text + ",current:" + this.TextBox7.Text + "});", true);
                int       hehe = Convert.ToInt32(this.TextBox7.Text);
                DataTable dt   = BLL_Hotel.Cha_GuestInfoByMobile(this.TextBox5.Text, hehe);
                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }
            else if (this.Label1.Text == "Pid")
            {
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "$('.tcdPageCode').createPage({pageCount:" + this.TextBox3.Text + ",current:" + this.TextBox7.Text + "});", true);
                int       hehe = Convert.ToInt32(this.TextBox7.Text);
                DataTable dt   = BLL_Hotel.Cha_GuestInfoByPid(this.TextBox6.Text, hehe);
                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }
            else
            {
                int       hehe = Convert.ToInt32(this.TextBox7.Text);
                DataTable dt   = BLL_Hotel.Cha_CusFenYe(hehe);
                this.GridView1.DataSource = dt;
                this.GridView1.DataBind();
            }
        }