using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


namespace HotelProject
{
    public partial class FrmGivenServicesList : Form
    {
        SqlConnection con;

        public FrmGivenServicesList()
        {
            InitializeComponent();
        }

        private void FrmGivenServicesList_Load(object sender, EventArgs e)
        {
            con = new SqlConnection("Server = . ; DataBase = DbHotel ; Integrated Security = True");
            SqlDataAdapter da = new SqlDataAdapter("SelectGivenServices", con);
            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            da.SelectCommand.Parameters.AddWithValue("CustomerID", LblCode.Text);
            DataTable dt = new DataTable();
            da.Fill(dt);

            GrdList.DataSource = dt;
        }
    }
}
