public SectionFGas GetSectionFGas()
        {
            var fgas = new SectionFGas
            {
                LTDate            = LeakTestDate.NullableDate,
                LTStartTime       = LeakTestStartTime.NullableTime,
                LTFinishTime      = LeakTestFinishTime.NullableTime,
                LTSystemNumber    = (LeakTestSystemNo.Text == null ? "" : LeakTestSystemNo.Text),
                LTLeakFoundYes    = LeakTestLeakFoundYes.IsChecked,
                LTLeakFoundNo     = LeakTestLeakFoundNo.IsChecked,
                LTLocationOfLeak  = (LeakTestLocationOfLeak.Text == null ? "" : LeakTestLocationOfLeak.Text),
                LTDetailsOfRepair = (LeakTestDetailsOfRepair.Text == null ? "" : LeakTestDetailsOfRepair.Text),
                LTActionTaken     = (LeakTestActionsToPreventLeak.Text == null ? "" : LeakTestActionsToPreventLeak.Text),

                RLTDate         = ReturnLeakDate.NullableDate,
                RLTStartTime    = ReturnLeakStartTime.NullableTime,
                RLTFinishTime   = ReturnLeakFinishTime.NullableTime,
                RLTSystemNumber = (ReturnLeakSystemNo.Text == null ? "" : ReturnLeakSystemNo.Text),
                RLTLeakFoundYes = ReturnLeakLeakFoundYes.IsChecked,
                RLTLeakFoundNo  = ReturnLeakLeakFoundNo.IsChecked,
                RLTDetails      = (ReturnLeakDetails.Text == null ? "" : ReturnLeakDetails.Text),
            };

            return(fgas);
        }
        public void SetSectionFGas(SectionFGas fgas)
        {
            LeakTestDate.NullableDate         = fgas.LTDate;
            LeakTestStartTime.NullableTime    = fgas.LTStartTime;
            LeakTestFinishTime.NullableTime   = fgas.LTFinishTime;
            LeakTestSystemNo.Text             = fgas.LTSystemNumber;
            LeakTestLeakFoundYes.IsChecked    = fgas.LTLeakFoundYes ?? false;
            LeakTestLeakFoundNo.IsChecked     = fgas.LTLeakFoundNo ?? false;
            LeakTestLocationOfLeak.Text       = fgas.LTLocationOfLeak;
            LeakTestDetailsOfRepair.Text      = fgas.LTDetailsOfRepair;
            LeakTestActionsToPreventLeak.Text = fgas.LTActionTaken;

            ReturnLeakDate.NullableDate       = fgas.RLTDate;
            ReturnLeakStartTime.NullableTime  = fgas.RLTStartTime;
            ReturnLeakFinishTime.NullableTime = fgas.RLTFinishTime;
            ReturnLeakSystemNo.Text           = fgas.RLTSystemNumber;
            ReturnLeakLeakFoundYes.IsChecked  = fgas.RLTLeakFoundYes ?? false;
            ReturnLeakLeakFoundNo.IsChecked   = fgas.RLTLeakFoundNo ?? false;
            ReturnLeakDetails.Text            = fgas.RLTDetails;
        }
Exemple #3
0
        public SectionFGas GetSectionFGas()
        {
            SectionFGas fgas = new SectionFGas
            {
                TempOnArrival        = (TempOnArrival.Text == null ? "" : TempOnArrival.Text),
                TempOnDeparture      = (TempOnDeparture.Text == null ? "" : TempOnDeparture.Text),
                PlantLeftOperational = (PlantLeftOperational.SelectedItem == null ? "" : PlantLeftOperational.SelectedItem.ToString()),
                JobComplete          = (JobComplete.SelectedItem == null ? "" : JobComplete.SelectedItem.ToString()),
            };

            foreach (PartsView view in AddMoreParts.Children)
            {
                fgas.PartsList.Add(view.GetPart());
            }

            foreach (TimeSheetAccordionView view in AddMoreTimeSection.Children)
            {
                fgas.TimeSheetList.Add(view.GetTimeSheet());
            }

            return(fgas);
        }