Example #1
0
        protected override void ConvertForm(AbstractFormObject form)
        {
            Appserver.FormSubmit.MileageForm m = (Appserver.FormSubmit.MileageForm)form;
            totalMiles = new PWAsubmissionVals(m.totalMiles);

            mileagesheet = new PWAmileageEntries();
            var entries = new List <PWAmileageVals>();

            foreach (var entry in m.Mileage)
            {
                entries.Add(new PWAmileageVals
                {
                    date       = entry.date,
                    totalMiles = entry.totalMiles,
                    group      = entry.group,
                    purpose    = entry.purpose,
                    wasEdited  = false
                });
            }

            mileagesheet.value = entries;
        }
Example #2
0
        protected override void ConvertForm(AbstractFormObject form)
        {
            TimesheetForm ts = (TimesheetForm)form;

            totalHours = new PWAsubmissionVals(ts.totalHours);

            timesheet = new PWAtimesheetEntries();
            var entries = new List <PWAtimesheetVals>();

            foreach (var entry in ts.Times)
            {
                entries.Add(new PWAtimesheetVals
                {
                    date       = entry.date,
                    starttime  = entry.starttime,
                    endtime    = entry.endtime,
                    group      = entry.group,
                    totalHours = entry.totalHours,
                    wasEdited  = false
                });
            }

            timesheet.value = entries;
        }