//private void backbutton1_Click(object sender, EventArgs e)
        //{
        //    Courses CoursesUI = new Courses();
        //    CoursesUI.Show();
        //    this.Hide();
        //}

        private void confirmbutton1_Click(object sender, EventArgs e)
        {
            DAL.DAO.CourseO aCourseInfo = new DAL.DAO.CourseO();
            aCourseInfo.Name = coursenametextBox.Text;
            aCourseInfo.Id   = courseidtextBox.Text;

            aCourseInfo.Credit = 0;
            double.TryParse(CredittextBox.Text, out aCourseInfo.Credit);



            aCourseInfo.Semister  = semistertextBox.Text;
            aCourseInfo.Teacher   = teachertextBox.Text;
            aCourseInfo.CourseFee = coursefeetextBox.Text;

            CourseBL CourseBLOBJ = new CourseBL();
            bool     result      = CourseBLOBJ.ValidateNewCourseandSendToDA(aCourseInfo);

            if (result)
            {
                MessageBox.Show("A NEW COURSE ADDED");
                //this.populateDataGriedview();
                this.PopulateDatagridview();
                Updatebutton.Enabled      = true;
                deletcoursebutton.Enabled = true;
                CANCELbutton1.Enabled     = true;


                confirmbutton1.Enabled = true;

                coursenametextBox.Text = " ";
                courseidtextBox.Text   = " ";
                CredittextBox.Text     = " ";
                semistertextBox.Text   = " ";
                teachertextBox.Text    = " ";
                coursefeetextBox.Text  = " ";
            }
            else
            {
                MessageBox.Show("RESULT: " + CourseBLOBJ.Message);
            }
        }