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); } } } } } } }
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); } }