Esempio n. 1
0
        // logging helper
        public static string FormatVehicleTypeDTO(VehicleTypeDTO vehicleTypeDTO)
        {
            if (vehicleTypeDTO == null)
            {
                // null
                return("vehicleTypeDTO: null");
            }
            else
            {
                // output values
                return("vehicleTypeDTO: \n"
                       + "{ \n"

                       + "    VehicleTypeId: " + "'" + vehicleTypeDTO.VehicleTypeId + "'" + ", \n"
                       + "    Name: " + (vehicleTypeDTO.Name != null ? "'" + vehicleTypeDTO.Name + "'" : "null") + ", \n"
                       + "    Description: " + (vehicleTypeDTO.Description != null ? "'" + vehicleTypeDTO.Description + "'" : "null") + ", \n"
                       + "    Active: " + "'" + vehicleTypeDTO.Active + "'" + ", \n"
                       + "    IsDeleted: " + "'" + vehicleTypeDTO.IsDeleted + "'" + ", \n"
                       + "    CreateBy: " + (vehicleTypeDTO.CreateBy != null ? "'" + vehicleTypeDTO.CreateBy + "'" : "null") + ", \n"
                       + "    CreateOn: " + (vehicleTypeDTO.CreateOn != null ? "'" + vehicleTypeDTO.CreateOn + "'" : "null") + ", \n"
                       + "    UpdateBy: " + (vehicleTypeDTO.UpdateBy != null ? "'" + vehicleTypeDTO.UpdateBy + "'" : "null") + ", \n"
                       + "    UpdateOn: " + (vehicleTypeDTO.UpdateOn != null ? "'" + vehicleTypeDTO.UpdateOn + "'" : "null") + " \n"
                       + "} \n");
            }
        }
Esempio n. 2
0
        public static R_VehicleType ConvertDTOtoEntity(VehicleTypeDTO dto)
        {
            R_VehicleType vehicleType = new R_VehicleType();

            vehicleType.VehicleTypeId = dto.VehicleTypeId;
            vehicleType.Name          = dto.Name;
            vehicleType.Description   = dto.Description;
            vehicleType.Active        = dto.Active;
            vehicleType.IsDeleted     = dto.IsDeleted;
            vehicleType.CreateBy      = dto.CreateBy;
            vehicleType.CreateOn      = dto.CreateOn;
            vehicleType.UpdateBy      = dto.UpdateBy;
            vehicleType.UpdateOn      = dto.UpdateOn;

            return(vehicleType);
        }