Example #1
0
        // logging helper
        public static string FormatCalendarEventDTO(CalendarEventDTO calendarEventDTO)
        {
            if (calendarEventDTO == null)
            {
                // null
                return("calendarEventDTO: null");
            }
            else
            {
                // output values
                return("calendarEventDTO: \n"
                       + "{ \n"

                       + "    CalendarEventId: " + "'" + calendarEventDTO.CalendarEventId + "'" + ", \n"
                       + "    NucleoId: " + (calendarEventDTO.NucleoId != null ? "'" + calendarEventDTO.NucleoId + "'" : "null") + ", \n"
                       + "    Name: " + (calendarEventDTO.Name != null ? "'" + calendarEventDTO.Name + "'" : "null") + ", \n"
                       + "    Description: " + (calendarEventDTO.Description != null ? "'" + calendarEventDTO.Description + "'" : "null") + ", \n"
                       + "    StartDate: " + "'" + calendarEventDTO.StartDate + "'" + ", \n"
                       + "    EndDate: " + "'" + calendarEventDTO.EndDate + "'" + ", \n"
                       + "    Active: " + "'" + calendarEventDTO.Active + "'" + ", \n"
                       + "    IsDeleted: " + "'" + calendarEventDTO.IsDeleted + "'" + ", \n"
                       + "    CreateBy: " + (calendarEventDTO.CreateBy != null ? "'" + calendarEventDTO.CreateBy + "'" : "null") + ", \n"
                       + "    CreateOn: " + (calendarEventDTO.CreateOn != null ? "'" + calendarEventDTO.CreateOn + "'" : "null") + ", \n"
                       + "    UpdateBy: " + (calendarEventDTO.UpdateBy != null ? "'" + calendarEventDTO.UpdateBy + "'" : "null") + ", \n"
                       + "    UpdateOn: " + (calendarEventDTO.UpdateOn != null ? "'" + calendarEventDTO.UpdateOn + "'" : "null") + " \n"
                       + "} \n");
            }
        }
Example #2
0
        public static R_CalendarEvent ConvertDTOtoEntity(CalendarEventDTO dto)
        {
            R_CalendarEvent calendarEvent = new R_CalendarEvent();

            calendarEvent.CalendarEventId = dto.CalendarEventId;
            calendarEvent.NucleoId        = dto.NucleoId;
            calendarEvent.Name            = dto.Name;
            calendarEvent.Description     = dto.Description;
            calendarEvent.StartDate       = dto.StartDate;
            calendarEvent.EndDate         = dto.EndDate;
            calendarEvent.Active          = dto.Active;
            calendarEvent.IsDeleted       = dto.IsDeleted;
            calendarEvent.CreateBy        = dto.CreateBy;
            calendarEvent.CreateOn        = dto.CreateOn;
            calendarEvent.UpdateBy        = dto.UpdateBy;
            calendarEvent.UpdateOn        = dto.UpdateOn;

            return(calendarEvent);
        }