protected override void ListViewBasic_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.F5)
            {
                ControllerManagement.RefreshListViewSubFamily();
                MessageBox.Show("List view refreshed !");
            }

            base.ListViewBasic_KeyDown(sender, e);
        }
        public Dialog_SubFamily()
        {
            InitializeComponent();
            this.Size = new Size(500, 400);

            ListViewBasic.Columns.Add("RefSubFamily");
            ListViewBasic.Columns.Add("Family Name");
            ListViewBasic.Columns.Add("SubFamily Name");

            ControllerManagement.RefreshListViewSubFamily();
        }
        protected override void Delete()
        {
            if (ListViewBasic.SelectedItems.Count != 0)
            {
                // Get RefSubFamily from the ListView
                int RefSubFamily = int.Parse(ListViewBasic.SelectedItems[0].Text);

                if (ControllerManagement.DeleteSubFamily(RefSubFamily))
                {
                    ControllerManagement.RefreshListViewSubFamily();
                    MessageBox.Show("Succesfully deleted the SubFamily !");
                }
                else
                {
                    MessageBox.Show("Error : Fail to delete the SubFamily ! ");
                }
            }
            else
            {
                MessageBox.Show("Error : Choose a SubFamily before trying  to delete it !");
            }
        }
        private void BtnOK_Click(object sender, EventArgs e)
        {
            try
            {
                if (Dialog_Basic.ModifyOrAdd == 0)
                {
                    if (!ControllerManagement.ModifySubFamily(int.Parse(TextRefSubFamily.Text), TextBox.Text, Combobox.SelectedItem.ToString()))
                    {
                        MessageBox.Show("Fail to modify the subfamily ! ");
                    }
                    else
                    {
                        if (MessageBox.Show("Successfully modified the subfamily !") == DialogResult.OK)
                        {
                            Close();
                        }
                    }
                }
                else if (Dialog_Basic.ModifyOrAdd == 1)
                {
                    ControllerManagement.AddSubFamily(TextBox.Text, Combobox.SelectedItem.ToString());

                    if (MessageBox.Show("Successfully added the subfamily !") == DialogResult.OK)
                    {
                        Mercure.MainWindow.StatusSQL_Label.Text = "Operation on subFamily.";
                        Close();
                    }
                }

                ControllerManagement.RefreshListViewSubFamily();
                ControllerFurniture.RefreshListView(-1);
            }
            catch (Exception Exception)
            {
                MessageBox.Show("Error during the operation ! " + Exception.Message);
            }
        }
        protected override void ListViewBasic_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            base.ListViewBasic_ColumnClick(sender, e);

            ControllerManagement.RefreshListViewSubFamily();
        }