public static Decimal GetGpa(int CourseId, decimal score) { var bllCourse = new Course(); int credit = Convert.ToInt16(bllCourse.GetModel(CourseId).Credit); if (score<60) { return 0; } decimal Gpa = (score / 10 - 5) * credit; return Gpa; }
public static string GetCourseName(int id) { var bll = new Course(); return bll.GetModel(id).Name; }
public static decimal GetCourseGpa(int id) { var bll = new Course(); return decimal.Parse(bll.GetModel(id).Credit.ToString()); }