Ejemplo n.º 1
0
        public string Save(CourseAssign aCourseAssign)
        {
            bool check = aCourseAssignGateway.IsCourseAssigned(aCourseAssign.CourseId);

            if (check != true)
            {
                aCourseAssign.RemainingCredit = aCourseAssign.RemainingCredit - aCourseAssign.CourseCredit;
                int rowAffected = aCourseAssignGateway.Save(aCourseAssign);
                if (rowAffected > 0)
                {
                    return("Successfully Saved");
                }
                else
                {
                    return("Saving failed");
                }
            }
            return("Course Already Assigned");
        }