protected void SubmitButton_Click(object sender, EventArgs e)
    {
        da = new SqlDataAdapter("insert into Hotel_Details(H_Type,H_Stars,H_Name,H_Country,Room_Category,H_City,Amount,Description)values('" + typeDropDownList.SelectedItem.Text + "','" + StarDropDownList.SelectedItem.Text + "','" + NameTextBox.Text + "','" + DropDownCountry.SelectedItem.Text + "','" + DropdownCategory.SelectedItem.Text + "','" + DropDownCity.SelectedItem.Text + "'," + AmtTextBox.Text + ",'" + DescTextBox.Text + "')", con);
        dt = new DataTable();
        da.Fill(dt);
        cmtLabel.Text = "Data Submit";
        typeDropDownList.ClearSelection();
        StarDropDownList.ClearSelection();
        NameTextBox.Text = "";
        DropDownCountry.ClearSelection();
        DropdownCategory.ClearSelection();
        DropDownCity.ClearSelection();
        AmtTextBox.Text  = "";
        DescTextBox.Text = "";

        da = new SqlDataAdapter("select * from Hotel_Details order by H_Id desc", con);
        dt = new DataTable();
        da.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridViewHotelDetails.DataSource = dt;
            GridViewHotelDetails.DataBind();
        }
        else
        {
            GridViewHotelDetails.DataSource = "";
            GridViewHotelDetails.DataBind();
        }
    }
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        da = new SqlDataAdapter("insert into Transport_Details(T_Type,T_category,T_Name,To_Country,To_City,From_Country,From_City,Date,Time,Amount,Description)values('" + typeDropDownList.SelectedItem.Text + "','" + DropdownCategory.SelectedItem.Text + "','" + NameTextBox.Text + "','" + DropDownToCountry.SelectedItem.Text + "','" + DropDownToCity.SelectedItem.Text + "','" + DropDownFromCountry.SelectedItem.Text + "','" + DropDownFromCity.SelectedItem.Text + "','" + TextBox1.Text + "','" + TimeTextBox.Text + "'," + AmtTextBox.Text + ",'" + DescTextBox.Text + "')", con);
        dt = new DataTable();
        da.Fill(dt);
        Label2.Text   = "Data Sumbmit";
        TextBox1.Text = "";
        DropdownCategory.ClearSelection();
        DropDownToCountry.ClearSelection();
        DropDownToCity.ClearSelection();
        DropDownFromCountry.ClearSelection();
        DropDownFromCity.ClearSelection();
        NameTextBox.Text = "";
        typeDropDownList.ClearSelection();
        TimeTextBox.Text = "";
        AmtTextBox.Text  = "";
        DescTextBox.Text = "";

        da = new SqlDataAdapter("select  T_Id,T_Type,T_Category,T_Name,To_Country,To_City,From_Country,From_City,convert(varchar,Date,106)Date,Time,Amount,Description  from Transport_Details order by T_Id DESC", con);
        dt = new DataTable();
        da.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridViewTransportDetails.DataSource = dt;
            GridViewTransportDetails.DataBind();
        }
        else
        {
            GridViewTransportDetails.DataSource = "";
            GridViewTransportDetails.DataBind();
        }
    }
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        da = new SqlDataAdapter("insert into [Homestay-Resort_Details](HR_Type,HR_Stars,HR_Category,HR_Name,HR_Country,HR_City,Amount,Description)values('" + DropDownListType.SelectedItem.Text + "','" + NameDropDownList.SelectedItem.Text + "','" + DropdownCategory.SelectedItem.Text + "','" + NameTextBox.Text + "','" + DropDownCountry.SelectedItem.Text + "','" + DropDownCity.SelectedItem.Text + "'," + TextBoxAmount.Text + ",'" + DescTextBox.Text + "')", con);
        dt = new DataTable();
        da.Fill(dt);
        CmtLabel.Text = "Data Submit";
        DropDownListType.ClearSelection();
        NameDropDownList.ClearSelection();
        DropdownCategory.ClearSelection();
        NameTextBox.Text = "";
        DropDownCountry.ClearSelection();
        DropDownCity.ClearSelection();
        TextBoxAmount.Text = "";
        DescTextBox.Text   = "";
        CmtLabel.Text      = "Data Submit";


        da = new SqlDataAdapter("select * from [Homestay-Resort_Details] order by HR_ID desc", con);
        dt = new DataTable();
        da.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridViewHomestayDetails.DataSource = dt;
            GridViewHomestayDetails.DataBind();
        }
        else
        {
            GridViewHomestayDetails.DataSource = "";
            GridViewHomestayDetails.DataBind();
        }
    }
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        da = new SqlDataAdapter("insert into Package_Details(P_Type,P_Category,Country,City,Days,Amount,Description)values('" + DropDownListType.SelectedItem.Text + "','" + DropdownCategory.SelectedItem.Text + "','" + DropDownCountry.SelectedItem.Text + "','" + DropDownCity.SelectedItem.Text + "','" + TextBoxDays.Text + "'," + TextBoxAmount.Text + ",'" + TextBoxDesc.Text + "')", con);
        dt = new DataTable();
        da.Fill(dt);
        Label1.Text = "Data Submit Successfully";
        DropDownCountry.ClearSelection();
        DropDownCity.ClearSelection();
        DropdownCategory.ClearSelection();
        DropDownListType.ClearSelection();
        TextBoxDays.Text   = "";
        TextBoxAmount.Text = "";
        TextBoxDesc.Text   = "";

        da = new SqlDataAdapter("select * from Package_Details order by P_Id desc", con);
        dt = new DataTable();
        da.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridViewPackageDetails.DataSource = dt;
            GridViewPackageDetails.DataBind();
        }
        else
        {
            GridViewPackageDetails.DataSource = "";
            GridViewPackageDetails.DataBind();
        }
    }
        public DropdownCategory ProcessRow(SqlDataReader read, params DropdownCategory.LazyComponents[] lazyComponents)
        {
            DropdownCategory category = new DropdownCategory();
            category.Id = Convert.ToInt32(read["a.Id"]);
            category.ShortName = read["a.ShortName"].ToString();
            category.LongName = read["a.LongName"].ToString();

            return category;
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        con = new SqlConnection(ConfigurationManager.AppSettings["con"]);
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select * from Hotel_Details order by H_Id desc", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                GridViewHotelDetails.DataSource = dt;
                GridViewHotelDetails.DataBind();
            }
            else
            {
                GridViewHotelDetails.DataSource = "";
                GridViewHotelDetails.DataBind();
            }
        }
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select distinct CountryName from CountryCityMaster order by CountryName", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                DropDownCountry.DataSource    = dt;
                DropDownCountry.DataTextField = "CountryName";
                DropDownCountry.DataBind();

                DropDownCountry.Items.Insert(0, "Select Country");
                DropDownCountry.Items.Insert(dt.Rows.Count + 1, "Other Country");
            }
        }
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select RoomCategory from  RoomCategory", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                DropdownCategory.DataSource    = dt;
                DropdownCategory.DataTextField = "RoomCategory";
                DropdownCategory.DataBind();

                DropdownCategory.Items.Insert(0, "Select Room");
                DropdownCategory.Items.Insert(dt.Rows.Count + 1, "Other Room");
            }
        }
        if (Request.QueryString["P"] == "AMP")
        {
            hiderow6.Visible             = false;
            hiderow1.Visible             = true;
            hiderow2.Visible             = true;
            hiderow3.Visible             = true;
            hiderow4.Visible             = true;
            SubmitButton.Visible         = true;
            Button1.Visible              = false;
            titleLabel.Text              = "Insert Hotel Detail";
            GridViewHotelDetails.Visible = true;
        }
        else if (Request.QueryString["P"] == "UMP")
        {
            hiderow6.Visible             = true;
            hiderow1.Visible             = false;
            hiderow2.Visible             = false;
            hiderow3.Visible             = false;
            hiderow4.Visible             = false;
            SubmitButton.Visible         = false;
            Button1.Visible              = true;
            titleLabel.Text              = "Search Hotel";
            GridViewHotelDetails.Visible = false;
        }
        else
        {
            hiderow6.Visible             = true;
            hiderow1.Visible             = false;
            hiderow2.Visible             = false;
            hiderow3.Visible             = false;
            hiderow4.Visible             = false;
            SubmitButton.Visible         = false;
            Button1.Visible              = true;
            titleLabel.Text              = "Search Hotel";
            GridViewHotelDetails.Visible = false;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        con = new SqlConnection(ConfigurationManager.AppSettings["con"]);
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select  T_Id,T_Type,T_Category,T_Name,To_Country,To_City,From_Country,From_City,convert(varchar,Date,106)Date,Time,Amount,Description  from Transport_Details order by T_Id DESC", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                GridViewTransportDetails.DataSource = dt;
                GridViewTransportDetails.DataBind();
            }
            else
            {
                GridViewTransportDetails.DataSource = "";
                GridViewTransportDetails.DataBind();
            }
        }
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select TransportCategory from  TransportCategory", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                DropdownCategory.DataSource    = dt;
                DropdownCategory.DataTextField = "TransportCategory";
                DropdownCategory.DataBind();
                DropdownCategory.Items.Insert(0, "Select Transport");
                DropdownCategory.Items.Insert(dt.Rows.Count + 1, "Other Transport");
            }
        }
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select distinct CountryName from CountryCityMaster order by CountryName", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                DropDownToCountry.DataSource    = dt;
                DropDownToCountry.DataTextField = "CountryName";
                DropDownToCountry.DataBind();

                DropDownToCountry.Items.Insert(0, "Select Country");
                DropDownToCountry.Items.Insert(dt.Rows.Count + 1, "Other Country");
            }
        }
        if (Page.IsPostBack == false)
        {
            da = new SqlDataAdapter("select distinct CountryName from CountryCityMaster order by CountryName", con);
            dt = new DataTable();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                DropDownFromCountry.DataSource    = dt;
                DropDownFromCountry.DataTextField = "CountryName";
                DropDownFromCountry.DataBind();

                DropDownFromCountry.Items.Insert(0, "Select Country");
                DropDownFromCountry.Items.Insert(dt.Rows.Count + 1, "Other Country");
            }
        }
        if (Request.QueryString["P"] == "AMP")
        {
            hiderow1.Visible                 = true;
            hiderow2.Visible                 = true;
            hiderow3.Visible                 = true;
            hiderow4.Visible                 = true;
            hiderow5.Visible                 = true;
            hiderow6.Visible                 = true;
            hiderow7.Visible                 = false;
            hiderow8.Visible                 = false;
            SubmitButton.Visible             = true;
            Button1.Visible                  = false;
            titleLabel.Text                  = "Insert Transport Detail";
            GridViewTransportDetails.Visible = true;
        }
        else if (Request.QueryString["P"] == "UMP")
        {
            hiderow1.Visible                 = false;
            hiderow2.Visible                 = false;
            hiderow3.Visible                 = false;
            hiderow4.Visible                 = false;
            hiderow5.Visible                 = false;
            hiderow6.Visible                 = false;
            hiderow7.Visible                 = true;;
            hiderow8.Visible                 = true;
            SubmitButton.Visible             = false;
            Button1.Visible                  = true;
            titleLabel.Text                  = "Search Transport";
            GridViewTransportDetails.Visible = false;
        }
        else
        {
            hiderow1.Visible                 = false;
            hiderow2.Visible                 = false;
            hiderow3.Visible                 = false;
            hiderow4.Visible                 = false;
            hiderow5.Visible                 = false;
            hiderow6.Visible                 = false;
            SubmitButton.Visible             = false;
            Button1.Visible                  = true;
            titleLabel.Text                  = "Search Transport";
            GridViewTransportDetails.Visible = false;
        }
    }