Ejemplo n.º 1
0
 private void SchedulerInit()
 {
     this.ResourceTypes = new ObservableCollection<ResourceType>();
     this.SchedulerCategories = new CategoryCollection();
     this.selectedCalendars = new List<ScheduleCalendar>();
     this.SchedulerCurrentDate = Etech.Library.DateEx.GetStartOfDay(DateTime.Today);
     this.defaultResource = new Resource("Personal", "Calendar");
     this.GroupFilter = new Func<object, bool>(this.GroupFilterFunc);
     this.schedulerDoc = new PrintDocument();
     this.schedulerDoc.PrintPage += new EventHandler<PrintPageEventArgs>(OnSchedulerPrintPage);
     this.schedulerDoc.EndPrint += new EventHandler<EndPrintEventArgs>(OnSchedulerEndPrint);
     this.SchedulerEditingId = Guid.Empty;
 }
Ejemplo n.º 2
0
 private string GetScheduleGroup(ResourceCollection ar)
 {
     var r1 = new Resource("机队管理组", "工作组");
     var r2 = new Resource("机务组", "工作组");
     var r3 = new Resource("后勤组", "工作组");
     var r4 = new Resource("其他", "工作组");
     if (ar.Contains(r1))
         return r1.DisplayName;
     else if (ar.Contains(r2))
         return r2.DisplayName;
     else if (ar.Contains(r3))
         return r3.DisplayName;
     else if (ar.Contains(r4))
         return r4.DisplayName;
     else return "其他";
 }
 /// <summary>
 /// The get user control options.
 /// </summary>
 /// <param name="project">
 /// The project.
 /// </param>
 /// <returns>
 /// The <see cref="UserControl"/>.
 /// </returns>
 public UserControl GetUserControlOptions(Resource project)
 {
     return null;
 }
Ejemplo n.º 4
0
 Resource GetResource(string groupName)
 {
     switch (groupName)
     {
         case "机队管理组":
             {
                 var resource = new Resource("机队管理组", "工作组");
                 return resource;
             }
         case "机务组":
             {
                 var resource = new Resource("机务组", "工作组");
                 return resource;
             }
         case "后勤组":
             {
                 var resource = new Resource("后勤组", "工作组");
                 return resource;
             }
         case "其他":
             {
                 var resource = new Resource("其他", "工作组");
                 return resource;
             }
         default:
             return null;
     }
 }