using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using hqgl.user;
using Common;
using WebMessageBox;
public partial class general_sushe_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        userchuli uch = new userchuli();
        uch.user_yanzheng();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql = "insert into room_inf values('#房间号#' ,'#入住性别#', '#电话号码#','#电话端口#', '#网络端口#', #可住人数# ,#水表底数#, #电表底数#)";
        sql = sql.Replace("#房间号#", TextBox1.Text);
        sql = sql.Replace("#入住性别#", DropDownList1.SelectedValue);
        sql = sql.Replace("#电话号码#", TextBox3.Text);
        sql = sql.Replace("#电话端口#", TextBox4.Text);
        sql = sql.Replace("#网络端口#", TextBox5.Text);
        sql = sql.Replace("#可住人数#", TextBox6.Text);
        sql = sql.Replace("#水表底数#", TextBox7.Text);
        sql = sql.Replace("#电表底数#", TextBox8.Text);
        DbHelper db = new DbHelper();
        db.ExecuteSqlNonQuery(sql);
        MessageBox.Show("添加成功", "default.aspx");
    }
    protected void SqlDataSource1_Deleted(object sender, SqlDataSourceStatusEventArgs e)
    {
        SqlDataSource2.DeleteParameters["房间号"].DefaultValue = e.Command.Parameters[0].Value.ToString();
        SqlDataSource2.Delete();
    }
    protected void GridView11_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bk=this.style.backgroundColor;this.style.backgroundColor='gray';");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bk");
        }
    }
}
///?首发?于?5?1?A?S?P?X?