private void btnEditWC_Click(object sender, EventArgs e)
        {
            List <Label> lbls = new List <Label>();

            lbls.Add(this.lblEditWC_Test);

            ClearLabels(lbls.ToArray());

            bool test = TestTxtBoxIsEmpty(lbls,
                                          new KeyValuePair <Label, TextBox>(this.lblEditWC, this.txtEditWC_Name));;

            if (!test)
            {
                return;
            }

            try
            {
                WorkoutCategory wc = dbContext.WorkoutCategories
                                     .Where(r => r.ID == ((WorkoutCategory)this.bsWC.Current).ID).FirstOrDefault();
                wc.Name = this.txtEditWC_Name.Text;
                dbContext.SaveChanges();

                MessageBox.Show("修改運動類別成功");

                this.bsWC.ResetCurrentItem();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                RejectChanges();
            }
        }
        private void btnAddWC_Click(object sender, EventArgs e)
        {
            List <Label> lbls = new List <Label>();

            lbls.Add(this.lblAddWC_Test);

            ClearLabels(lbls.ToArray());

            bool test = TestTxtBoxIsEmpty(lbls,
                                          new KeyValuePair <Label, TextBox>(this.lblAddWC_Name, this.txtAddWC_Name));;

            if (!test)
            {
                return;
            }

            try
            {
                WorkoutCategory wc = new WorkoutCategory();
                wc.Name = this.txtAddWC_Name.Text;
                dbContext.WorkoutCategories.Add(wc);
                dbContext.SaveChanges();

                MessageBox.Show("新增運動類別成功");

                this.bsWC.Add(wc);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                RejectChanges();
            }
        }