Example #1
0
        private static void DeletProg()
        {
            ProgramOffered    program   = new ProgramOffered();
            ProgramsOfferedBL programBl = new ProgramsOfferedBL();

            bool progdeleted = programBl.Delete(program, "Btech Cs");

            if (progdeleted)
            {
                Console.WriteLine("Deleted Succesfully");
            }
            else
            {
                Console.WriteLine("not succesfully deleted");
            }
        }
        private void delete_click(object sender, RoutedEventArgs e)
        {
            try
            {
                ProgramsOfferedBL bL = new ProgramsOfferedBL();

                bool deleted = bL.Delete(pname_txt.Text);
                if (deleted)
                {
                    MessageBox.Show("Deleted Succesfully");
                }
            }
            catch (UniversityException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }