Ejemplo n.º 1
0
        public override Inps TranslateToModel(INPS entity)
        {
            try
            {
                Inps nps = null;
                if (entity != null)
                {
                    nps                       = new Inps();
                    nps.Id                    = entity.Inps_ID;
                    nps.Type                  = inpsTypeTranslator.Translate(entity.INPS_TYPE);
                    nps.Staff                 = staffTranslator.Translate(entity.STAFF);
                    nps.Kpi                   = entity.Kpi;
                    nps.Measure               = entity.Measure;
                    nps.DataSource            = entity.Data_Source;
                    nps.ResponsibleDepartment = departmentTranslator.Translate(entity.DEPARTMENT);
                    nps.Target                = entity.Target;
                    nps.Score                 = entity.Score;
                    nps.Period                = PeriodTranslator.Translate(entity.PERIOD);
                }

                return(nps);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public override InpsRating TranslateToModel(INPS_RATING entity)
        {
            try
            {
                InpsRating npsRating = null;
                if (entity != null)
                {
                    npsRating            = new InpsRating();
                    npsRating.Type       = inpsTypeTranslator.Translate(entity.INPS_TYPE);
                    npsRating.Rating     = ratingTranslator.Translate(entity.RATING);
                    npsRating.From       = entity.From;
                    npsRating.To         = entity.To;
                    npsRating.RatingType = ratingTypeTranslator.Translate(entity.RATING_TYPE);
                    npsRating.Period     = periodTranslator.Translate(entity.PERIOD);
                }

                return(npsRating);
            }
            catch (Exception)
            {
                throw;
            }
        }