예제 #1
0
 static Group()
 {
     var Schedule = new XmlDocument();
     Schedule.LoadXml("<Schedule xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><Weeks><WeekSchedule><Days><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule></Days></WeekSchedule><WeekSchedule><Days><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule></Days></WeekSchedule><WeekSchedule><Days><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule></Days></WeekSchedule><WeekSchedule><Days><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule><DaySchedule><Lessons><Lesson><Room xsi:nil=\"true\" /><Number>1</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>2</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>3</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>4</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>5</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>6</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>7</Number></Lesson><Lesson><Room xsi:nil=\"true\" /><Number>8</Number></Lesson></Lessons></DaySchedule></Days></WeekSchedule></Weeks></Schedule>");
     Global = new Group()
     {
         Name = "Global",
         CanBeDeleted = false,
         Users = new List<User>(),
         Schedule = Schedule
     };
 }
예제 #2
0
 public void Update(Group group)
 {
     provider.Update(group);
 }
예제 #3
0
 public void Delete(Group group)
 {
     if (!group.CanBeDeleted)
         throw new ArgumentException("This group cannot be deleted");
     provider.Delete(group);
 }
예제 #4
0
 public void Create(Group model)
 {
     provider.Create(model);
 }