- Timestamp:
- 06/20/11 14:16:53 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ResourcesView.cs
r6451 r6452 277 277 ServiceLocator.Instance.CallHiveService(service => { 278 278 var appointments = service.GetScheduleForResource(resourceId); 279 ItemList< Appointment> ias = new ItemList<Appointment>();279 ItemList<Downtime> ias = new ItemList<Downtime>(); 280 280 appointments.ForEach(a => ias.Add(a)); 281 281 scheduleView.Invoke(new Action(() => scheduleView.Content = ias)); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ScheduleView.cs
r6451 r6452 33 33 namespace HeuristicLab.Clients.Hive.Administration.Views { 34 34 [View("ScheduleView")] 35 [Content(typeof(IItemList< Appointment>), IsDefaultView = true)]35 [Content(typeof(IItemList<Downtime>), IsDefaultView = true)] 36 36 public partial class ScheduleView : ItemView { 37 public new IItemList< Appointment> Content {38 get { return (IItemList< Appointment>)base.Content; }37 public new IItemList<Downtime> Content { 38 get { return (IItemList<Downtime>)base.Content; } 39 39 set { base.Content = value; } 40 40 } … … 93 93 private void UpdateCalendarFromContent() { 94 94 offlineTimes.Clear(); 95 foreach ( Appointmentapp in Content) {95 foreach (Downtime app in Content) { 96 96 offlineTimes.Add(new HiveAppointment { 97 97 AllDayEvent = app.AllDayEvent, … … 331 331 332 332 private void btnSaveCal_Click(object sender, EventArgs e) { 333 List< Appointment> appointments = new List<Appointment>();333 List<Downtime> appointments = new List<Downtime>(); 334 334 foreach (HiveAppointment app in offlineTimes) { 335 335 if (app.Deleted) { … … 340 340 }); 341 341 } else if (app.Changed) { 342 Appointment apdto = new Appointment{342 Downtime apdto = new Downtime { 343 343 AllDayEvent = app.AllDayEvent, 344 344 EndDate = app.EndDate, … … 355 355 //TODO: find a sane way to do this 356 356 ServiceLocator.Instance.CallHiveService(service => { 357 foreach ( Appointmentapp in appointments) {357 foreach (Downtime app in appointments) { 358 358 service.AddAppointment(app); 359 359 }
Note: See TracChangeset
for help on using the changeset viewer.