public static void AddHonorariumToBase(HonorariumTeacher honorarium)
 {
     HonorariumTeacher.honorariesTeachers.Add(honorarium);
 }
 public static void AddHonorariumToBase(HonorariumTeacher honorarium)
 {
     HonorariumTeacher.honorariesTeachers.Add(honorarium);
 }
示例#3
0
        public void ExecuteSet(string[] commandWords)
        {
            string cW = commandWords[1].Split('_')[0];
            switch(cW)
            {
                case "honorarium":
                    ulong courseId = ulong.Parse(commandWords[2].Split('_')[1]);
                    ulong teacherId = ulong.Parse(commandWords[3].Split('_')[1]);
                    Course course = CourseInputer.GetCourseFromId(courseId);
                    Teacher teacher = CourseInputer.GetTeacherFromId(teacherId);
                    decimal result = 0M;
                    string hon = commandWords[1].Split('_')[1];
                    result = decimal.Parse(hon.ToLower().ToString());

                    bool exists = HonorariumTeacher.HonoraryCheck(courseId, teacherId);

                    if(exists == false)
                    {
                        HonorariumTeacher honorarium =
                            new HonorariumTeacher(teacher, course, result);

                        HonorariumTeacher.AddHonorariumToBase(honorarium);
                    }

                    break;
                default:
                    break;
            }
        }