private TimePeriodModel mapTimePeriodToTimePeriodModel(TimePeriod timePeriod)
        {
            TimePeriodModel tpm = new TimePeriodModel();
            tpm.TimePeriodId = timePeriod.timeperiodid;
            tpm.Type = timePeriod.type;

            return tpm;
        }
Example #2
0
        public AddCrop()
        {
            InitializeComponent();
            GetAllFieldsCallback handlerFields = new GetAllFieldsCallback(LoadFieldList);
            FieldModel fm = new FieldModel();
            fm.GetAllFields(new Action<List<FieldModel>>(handlerFields));

            GetAllTimePeriodsCallback handlerTpms = new GetAllTimePeriodsCallback(LoadTimePeriodList);
            TimePeriodModel tpm = new TimePeriodModel();
            tpm.GetAllTimePeriods(new Action<List<TimePeriodModel>>(handlerTpms));
        }