示例#1
0
 /// <summary>
 /// this constructor set the id and update the user filds from the data base;
 /// </summary>
 /// <param name="id"></param>
 public instructor(ulong id) : base(id)
 {
     int[]    toSaveConstraints = dbo.getConstraints(this.getid());
     string[] toSaveCourses     = dbo.getCoursesByTId(this.getid());
     try
     {
         for (int i = 4; i <= toSaveConstraints.Length; i += 4)
         {
             instrconstraints.Add(new techingStaffConstraints(toSaveConstraints[i - 3], toSaveConstraints[i - 2], toSaveConstraints[i - 1]));
         }
         for (int i = 0; i < toSaveCourses.Length; i++)
         {
             instrcourses.Add(toSaveCourses[i]);
         }
     }
     catch
     {
         MessageBox.Show("there was a problem with loading professor\n please check it with your admin");
     }
 }