Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/11 14:06:53 (13 years ago)
Author:
ascheibe
Message:

#1233 finished refactoring Hive Administrator UI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs

    r6756 r6761  
    305305
    306306    private void btnSaveCal_Click(object sender, EventArgs e) {
    307       List<Downtime> appointments = new List<Downtime>();
    308       foreach (HiveAppointment app in offlineTimes) {
    309         if (app.Deleted && app.Id != Guid.Empty) {
    310           HiveAdminClient.Delete(ToDowntime(app));
    311         } else if (app.Changed || app.Id == null || app.Id == Guid.Empty) {
    312           Downtime dt = ToDowntime(app);
    313           appointments.Add(dt);
    314         }
    315       }
    316       foreach (Downtime dt in appointments) {
    317         dt.Store();
     307      if (HiveAdminClient.Instance.DowntimeForResourceId == null || HiveAdminClient.Instance.DowntimeForResourceId == Guid.Empty) {
     308        MessageBox.Show("You have to save the goup before you can save the schedule. ", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     309      } else {
     310        List<Downtime> appointments = new List<Downtime>();
     311        foreach (HiveAppointment app in offlineTimes) {
     312          if (app.Deleted && app.Id != Guid.Empty) {
     313            HiveAdminClient.Delete(ToDowntime(app));
     314          } else if (app.Changed || app.Id == null || app.Id == Guid.Empty) {
     315            Downtime dt = ToDowntime(app);
     316            appointments.Add(dt);
     317          }
     318        }
     319        foreach (Downtime dt in appointments) {
     320          dt.Store();
     321        }
    318322      }
    319323    }
Note: See TracChangeset for help on using the changeset viewer.