Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
            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);
            }
Ejemplo n.º 4
0
            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);
            }
Ejemplo n.º 5
0
            public IEnumerable <courseClass> fetchCourses()
            {
                List <courseClass> response = new List <courseClass>();
                IcourseClient      fetch    = new IcourseClient();

                try
                {
                    response = fetch.fetchCourses(0, 0).ToList();
                }
                catch
                {
                }

                return(response);
            }
Ejemplo n.º 6
0
            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);
            }