Exemplo n.º 1
0
        public DataTable GetExistingCoursesBL()
        {
            DataTable dt          = new DataTable();
            CourseDA  CourseDAOBJ = new CourseDA();

            dt = CourseDAOBJ.GetExistingCoursesFromDB();
            return(dt);
        }
Exemplo n.º 2
0
        public bool UpdateNewCourseandSendToDA(DAL.DAO.CourseO aCourseInfo)
        {
            if (aCourseInfo.Id == " ")
            {
                this.Message = "Id is incorrect";
                return(false);
            }
            else
            {
                if (aCourseInfo.Name == " ")
                {
                    this.Message = "Name is Incorrect";
                    return(false);
                }
                else
                {
                    if (aCourseInfo.Credit <= 0 || aCourseInfo.Credit > 100)
                    {
                        this.Message = "Credit  is Overlaped";
                        return(false);
                    }
                    else
                    {
                        if (aCourseInfo.Semister == " ")
                        {
                            this.Message = "Semister is incorrect";
                            return(false);
                        }
                        else
                        {
                            if (aCourseInfo.Teacher == " ")
                            {
                                this.Message = "Teacher Info  is Incorrect";
                                return(false);
                            }
                            else
                            {
                                if (aCourseInfo.CourseFee == " ")
                                {
                                    this.Message = "CourseFee is Incorrect";
                                    return(false);
                                }

                                else
                                {
                                    CourseDA CourseDAOBj = new CourseDA();
                                    bool     result      = CourseDAOBj.UpdateNewCourseToDB(aCourseInfo);
                                    return(result);
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        public bool DeletACourseBL(DAL.DAO.CourseO aCourseInfo)
        {
            if (aCourseInfo.Id == " ")
            {
                this.Message = "Id is incorrect";
                return(false);
            }


            else
            {
                CourseDA CourseDAOBj = new CourseDA();
                bool     result      = CourseDAOBj.DeletACourseFromDB(aCourseInfo);
                return(result);
            }
        }
Exemplo n.º 4
0
 public static bool Delete(string courseID)
 {
     return(CourseDA.Delete(courseID));
 }
Exemplo n.º 5
0
 public static int Save(Course myCourse)
 {
     return(CourseDA.Save(myCourse));
 }
Exemplo n.º 6
0
 public static CourseList GetItem(string id, bool isStudent)
 {
     return(CourseDA.GetItem(id, isStudent));
 }
Exemplo n.º 7
0
 public static CourseList GetItem()
 {
     return(CourseDA.GetItem());
 }
Exemplo n.º 8
0
 public static Course GetItem(string courseID)
 {
     return(CourseDA.GetItem(courseID));
 }