private void btnsearch_Click(object sender, EventArgs e)
        {
            int id;

            bool flag = int.TryParse(txtnumber.Text, out id);

            if (!flag)
            {
                MessageBox.Show("Invalid ID");
                return;
            }


            RoomDetailController std = new RoomDetailController();
            RoomDetail           i   = std.Searchcustomer(id);

            if (i != null)
            {
                a = true;
                txtnumber.Text = i.Room_Number.ToString();
            }
            else
            {
                a = false;
                MessageBox.Show("Record Not Found");
            }
            RoomDetailController sc = new RoomDetailController();

            dt = new DataTable();
            if (a == true)
            {
                dt.Columns.Add("Room_Number", System.Type.GetType("System.String"));
                dt.Columns.Add("Room_Type", System.Type.GetType("System.String"));
                dt.Columns.Add("Phone", System.Type.GetType("System.String"));
                dt.Columns.Add("Reserved", System.Type.GetType("System.String"));
                List <RoomDetail> d = sc.GetAllitem();

                foreach (var s in d)
                {
                    if (id == s.Room_Number)
                    {
                        dt.Rows.Add(new object[] { s.Room_Number, s.Room_Type, s.Phone, s.Reserved });
                    }
                }
                dataGridView1.DataSource = dt;
            }
        }
        private void View_Click(object sender, EventArgs e)
        {
            RoomDetailController sc = new RoomDetailController();

            dt = new DataTable();
            dt.Columns.Add("Room_Number", System.Type.GetType("System.String"));
            dt.Columns.Add("Room_Type", System.Type.GetType("System.String"));
            dt.Columns.Add("Phone", System.Type.GetType("System.String"));
            dt.Columns.Add("Reserved", System.Type.GetType("System.String"));



            List <RoomDetail> sd = sc.GetAllitem();

            foreach (var s in sd)
            {
                dt.Rows.Add(new object[] {
                    s.Room_Number, s.Room_Type, s.Phone, s.Reserved
                });
            }
            dataGridView1.DataSource = dt;
        }