示例#1
0
        //************************* For Assign *******************
        public string AssignCourse(CourseAssignTeacher courseAssignTeacher)
        {
            if (courseAssignGateway.IsCourseExists(courseAssignTeacher.CourseId))
            {
                return("This Course already has been taken");
            }
            else
            {
                int rowAffect = courseAssignGateway.AssignCourse(courseAssignTeacher);
                if (rowAffect > 0)
                {
                    return("Assign Successful");
                }

                else
                {
                    return("Assign Failed");
                }
            }
        }