public IEnumerable <courseClass> courseInfo(string courseId) { IcourseClient client = new IcourseClient(); courseClass cou = client.courseInfo(courseId, new Guid().ToString());; List <courseClass> response = new List <courseClass>(); response.Add(cou); return(response); }
public string courseCreate(string name, string creator) { if (name.Length <= 0 || name == null) { return("nameNull"); } //if (creator.Length <= 0 || creator == null) { return "creatorNull"; } creator = Guid.NewGuid().ToString(); IcourseClient create = new IcourseClient(); string response = create.createCourseString(name, creator); return(response); }
public List <courseClass> fetchCourse(string course) { List <courseClass> response = new List <courseClass>(); IcourseClient fetch = new IcourseClient(); try { response = fetch.fetchCourses(0, 0).ToList(); } catch { } return(response); }
public string course(string courseId) { string response = "Success"; IcourseClient use = new IcourseClient(); try { response = use.deleteString(new Guid(courseId).ToString(), Guid.NewGuid().ToString()); } catch { response = "Error"; } return(response); }
public IEnumerable <courseClass> fetchCourses() { List <courseClass> response = new List <courseClass>(); IcourseClient fetch = new IcourseClient(); try { response = fetch.fetchCourses(0, 0).ToList(); } catch { } return(response); }
public string courseUpdate(courseClass list) { courseUpdate update = new courseUpdate(); IcourseClient client = new IcourseClient(); string response = "Error"; try { update.status = list.status; update.information = list.information; update.price = list.price; update.currency = list.currency; update.duration = list.duration; update.durationUnit = list.durationUnit; response = client.updateString(list.courseId.ToString(), update); } catch { // Error } return(response); }