Example #1
0
        }//end btn_AddChild_Click

        private void btn_Delete_Click(object sender, RoutedEventArgs e)
        {
            bool?delete;

            DeleteConformation DeleteConformation = new DeleteConformation();

            delete = DeleteConformation.ShowDialog();
            if ((bool)delete == true)
            {
                string pID = txt_IDNumber.Text;
                this.db.DeleteParentInfo(pID);
                ClearFields();
                DisableForm();
            }
        }//end btn_Delete_Click
        }//end btn_Submit_Click

        private void btn_Delete_Click(object sender, RoutedEventArgs e)
        {
            bool?delete;

            if (lst_ChildBox.SelectedItem != null)
            {
                DeleteConformation DeleteConformation = new DeleteConformation();
                delete = DeleteConformation.ShowDialog();

                if ((bool)delete == true)
                {
                    string cID = ((Child)(lst_ChildBox.SelectedItem)).ID;
                    this.db.DeleteChildInfo(cID);
                    lst_ChildBox.Items.Clear();
                    setChildBox();
                    ClearFields();
                }
            }
        }//end btn_Delete_Click