Esempio n. 1
0
 private void UpdateInformation()
 {
     dateTimePickerDate.Value = currentRecord.RecordDate;
     textBoxFlightHours.Text  = UsefulMethods.HoursToString(currentRecord.Lifelength.Hours);
     textBoxFlightCycles.Text = currentRecord.Lifelength.Cycles.ToString();
     textBoxRemarks.Text      = currentRecord.Description;
 }
Esempio n. 2
0
        private void FillActualState()
        {
            Lifelength actualState;

            if (currentDetail != null)
            {
                if (currentDetail is BaseDetail)
                {
                    actualState        = currentDetail.GetLifelength(dateTimePickerDate.Value);
                    actualStateRecords = currentDetail.GetActualSettingRecords(dateTimePickerDate.Value);
                }
                else
                {
                    actualState        = ((BaseDetail)currentDetail.Parent).GetLifelength(dateTimePickerDate.Value);
                    actualStateRecords = ((BaseDetail)currentDetail.Parent).GetActualSettingRecords(dateTimePickerDate.Value);
                }
            }
            else
            {
                actualState        = ((BaseDetail)currentDirective.Parent).GetLifelength(dateTimePickerDate.Value);
                actualStateRecords = ((BaseDetail)currentDirective.Parent).GetActualSettingRecords(dateTimePickerDate.Value);
            }
            if (actualState != null)
            {
                textBoxHours.Text  = UsefulMethods.HoursToString(actualState.Hours);
                textBoxCycles.Text = actualState.Cycles.ToString();
            }
            actualStateChanged = false;
        }