Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLRoomType.DataTextField  = "RoomTypeName";
         DDLRoomType.DataValueField = "RoomTypeID";
         DDLRoomType.DataSource     = rod.GetData("select * from RoomType");
         DDLRoomType.DataBind();
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = new DataTable();
         DDLRoomType.DataTextField  = "RoomTypeName";
         DDLRoomType.DataValueField = "RoomTypeID";
         DDLRoomType.DataSource     = rod.GetData("select * from RoomType");
         DDLRoomType.DataBind();
         dt                        = rod.GetData("select * from Room where RoomID=" + Request.QueryString["RoomID"].ToString());
         RoomName.Text             = dt.Rows[0]["RoomName"].ToString();
         DDLRoomType.SelectedValue = dt.Rows[0]["RoomTypeId"].ToString();
         Rate.Text                 = dt.Rows[0]["Rate"].ToString();
         Image1.ImageUrl           = "../Upload/" + dt.Rows[0]["Image1"].ToString();
         img1                      = dt.Rows[0]["Image1"].ToString();
         Image2.ImageUrl           = "../Upload/" + dt.Rows[0]["Image2"].ToString();
         img2                      = dt.Rows[0]["Image2"].ToString();
         Image3.ImageUrl           = "../Upload/" + dt.Rows[0]["Image3"].ToString();
         img3                      = dt.Rows[0]["Image3"].ToString();
         Image4.ImageUrl           = "../Upload/" + dt.Rows[0]["Image"].ToString();
         img                       = dt.Rows[0]["Image"].ToString();
     }
 }