Ejemplo n.º 1
0
 /// <summary>
 /// Сохранаяет данные заданного агрегата
 /// </summary>
 /// <param name="detail">Агрегат</param>
 public void SaveData(AbstractDetail detail)
 {
     if (CurrentStore.ID != parentStore.ID)
     {
         parentStore = CurrentStore;
     }
     if (currentDetail != null)
     {
         ((Detail)currentDetail).MoveDetail(parentStore, new TransferRecord());
     }
     else
     {
         parentStore.Add(detail);
     }
     if (textBoxShelfLife.Text != detail.ShelfLife)
     {
         detail.ShelfLife = textBoxShelfLife.Text;
     }
     if (textBoxLocation.Text != detail.Location)
     {
         detail.Location = textBoxLocation.Text;
     }
     if (dateTimePickerExpirationDate.Value != detail.ExpirationDate)
     {
         detail.ExpirationDate = dateTimePickerExpirationDate.Value;
     }
     if (dateTimePickerNotificationDate.Value != detail.NotificationDate)
     {
         detail.NotificationDate = dateTimePickerNotificationDate.Value;
     }
 }
Ejemplo n.º 2
0
        private void stubData()
        {
            Aircraft.Add("F-5E3");
            Aircraft.Add("AV-8b");
            var ap1 = new Airport
            {
                Name      = "Test1",
                Elevation = 1420
            };
            var runway1 = new Runway
            {
                Name           = "27",
                heading        = 267,
                UsableDistance = 5001,
                slope          = 0
            };

            ap1.Runways.Add(runway1);
            Airports.Add(ap1);
        }