示例#1
0
        private IEnumerable <AppointmentVO> BuildAppointments(DataTable dataTable)
        {
            var Appoinments = new List <AppointmentVO>();

            foreach (DataRow currentRow in dataTable.Rows)
            {
                var TempAppointment = new AppointmentVO
                {
                    Identity            = (int)currentRow["REQ_ETY_SCH_I"],
                    EntityName          = currentRow["ETY_NM"].ToString(),
                    EntityIdentity      = (int)currentRow["ETY_KEY_I"],
                    SequenceNumber      = (int)currentRow["SEQ_NBR"],
                    FunctionType        = currentRow["SCH_FUN_TYP"].ToString(),
                    AppointmentBegin    = (DateTime?)currentRow["BEG_S"],
                    AppointmentEnd      = (DateTime?)currentRow["END_S"],
                    TimezoneDescription = currentRow["TZ_TYP_DSC"].ToString(),

                    Status                 = currentRow["PRS_STT"].ToString(),
                    CreatedDate            = (DateTime?)currentRow["CRT_S"],
                    CreatedUserId          = currentRow["CRT_UID"].ToString(),
                    CreatedProgramCode     = currentRow["CRT_PGM_C"].ToString(),
                    LastUpdatedDate        = (DateTime?)currentRow["LST_UPD_S"],
                    LastUpdatedUserId      = currentRow["LST_UPD_UID"].ToString(),
                    LastUpdatedProgramCode = currentRow["LST_UPD_PGM_C"].ToString()
                };
                Appoinments.Add(TempAppointment);
            }

            return(Appoinments);
        }
示例#2
0
 private Scheduled SetSchedule(AppointmentVO appointmentVo) =>
 new Scheduled(appointmentVo.AppointmentBegin.GetValueOrDefault(),
               appointmentVo.AppointmentEnd.GetValueOrDefault());