protected void SelectGuestDetail(object sender, EventArgs e) { try { DataTable dt = new DataTable(); objML_Visitors.ID = ddlGuestName.SelectedValue != "" ? ddlGuestName.SelectedValue : null; dt = objBL_Visitors.BL_Select_Check_In_List(objML_Visitors); if (dt.Rows.Count > 0) { txtRoomNo.Text = dt.Rows[0]["RoomNo"].ToString(); lblID.Text = dt.Rows[0]["VisitorID"].ToString(); lblRoomPrice1.Text = dt.Rows[0]["RoomPrice"].ToString(); lbltaxAmt1.Text = dt.Rows[0]["TaxAmt1"].ToString(); lbltaxAmt2.Text = dt.Rows[0]["TaxAmt2"].ToString(); lbltaxAmt3.Text = dt.Rows[0]["TaxAmt3"].ToString(); lblTaxName1.Text = dt.Rows[0]["TaxName1"].ToString(); lblTaxName2.Text = dt.Rows[0]["TaxName2"].ToString(); lblTaxName3.Text = dt.Rows[0]["TaxName3"].ToString(); lblTaxRate1.Text = dt.Rows[0]["Taxrate1"].ToString(); lblTaxRate2.Text = dt.Rows[0]["Taxrate2"].ToString(); lblTaxRate3.Text = dt.Rows[0]["Taxrate3"].ToString(); lbltaxableamt.Text = dt.Rows[0]["TaxableAmount"].ToString(); lblDiscountPer.Text = dt.Rows[0]["Discount"].ToString(); lblDisocuntAmt.Text = dt.Rows[0]["DiscountAmt"].ToString(); GrdGuestList.DataSource = dt; GrdGuestList.DataBind(); ServiceDeskDetail(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('" + ex.Message.ToString() + "')", true); } }
protected void Clear(object sender, EventArgs e) { txtRoomNo.Text = ""; btnSave.Text = "Save"; ddlGuestName.SelectedIndex = 0; DivServiceDesk.Visible = false; divCaptionServiceDesk.Visible = false; divTotalCheckOutPrice.Visible = false; GrdGuestList.DataSource = null; GrdGuestList.DataBind(); GrdServiceDesk.DataSource = null; GrdServiceDesk.DataBind(); lbltaxableamt.Text = ""; lbltaxAmt1.Text = ""; lbltaxAmt2.Text = ""; lbltaxAmt3.Text = ""; lblTaxName1.Text = ""; lblTaxName2.Text = ""; lblTaxName3.Text = ""; lblTaxRate1.Text = ""; lblTaxRate2.Text = ""; lblTaxRate3.Text = ""; lblGrandTotal.Text = ""; lblDisocuntAmt.Text = ""; lblDiscountPer.Text = ""; }