Exemple #1
0
        // logging helper
        public static string FormatWeekDayDTO(WeekDayDTO weekDayDTO)
        {
            if (weekDayDTO == null)
            {
                // null
                return("weekDayDTO: null");
            }
            else
            {
                // output values
                return("weekDayDTO: \n"
                       + "{ \n"

                       + "    WeekDayId: " + "'" + weekDayDTO.WeekDayId + "'" + ", \n"
                       + "    NucleoId: " + (weekDayDTO.NucleoId != null ? "'" + weekDayDTO.NucleoId + "'" : "null") + ", \n"
                       + "    Name: " + (weekDayDTO.Name != null ? "'" + weekDayDTO.Name + "'" : "null") + ", \n"
                       + "    Description: " + (weekDayDTO.Description != null ? "'" + weekDayDTO.Description + "'" : "null") + ", \n"
                       + "    ResponsiblePersonId: " + (weekDayDTO.ResponsiblePersonId != null ? "'" + weekDayDTO.ResponsiblePersonId + "'" : "null") + ", \n"
                       + "    Active: " + "'" + weekDayDTO.Active + "'" + ", \n"
                       + "    IsDeleted: " + "'" + weekDayDTO.IsDeleted + "'" + ", \n"
                       + "    CreateBy: " + (weekDayDTO.CreateBy != null ? "'" + weekDayDTO.CreateBy + "'" : "null") + ", \n"
                       + "    CreateOn: " + (weekDayDTO.CreateOn != null ? "'" + weekDayDTO.CreateOn + "'" : "null") + ", \n"
                       + "    UpdateBy: " + (weekDayDTO.UpdateBy != null ? "'" + weekDayDTO.UpdateBy + "'" : "null") + ", \n"
                       + "    UpdateOn: " + (weekDayDTO.UpdateOn != null ? "'" + weekDayDTO.UpdateOn + "'" : "null") + " \n"
                       + "} \n");
            }
        }
Exemple #2
0
        public static R_WeekDay ConvertDTOtoEntity(WeekDayDTO dto)
        {
            R_WeekDay weekDay = new R_WeekDay();

            weekDay.WeekDayId           = dto.WeekDayId;
            weekDay.NucleoId            = dto.NucleoId;
            weekDay.Name                = dto.Name;
            weekDay.Description         = dto.Description;
            weekDay.ResponsiblePersonId = dto.ResponsiblePersonId;
            weekDay.Active              = dto.Active;
            weekDay.IsDeleted           = dto.IsDeleted;
            weekDay.CreateBy            = dto.CreateBy;
            weekDay.CreateOn            = dto.CreateOn;
            weekDay.UpdateBy            = dto.UpdateBy;
            weekDay.UpdateOn            = dto.UpdateOn;

            return(weekDay);
        }