Exemple #1
0
        public async Task <IHttpActionResult> GetWelcomeKudos()
        {
            var welcomeKudosDTO = _kudosService.GetWelcomeKudos();

            var result = _mapper.Map <WelcomeKudosDTO, WelcomeKudosViewModel>(welcomeKudosDTO);

            return(Ok(result));
        }
Exemple #2
0
        private void SetWelcomeKudos(ApplicationUser applicationUser)
        {
            var welcomeKudosDTO = _kudosService.GetWelcomeKudos();

            if (welcomeKudosDTO.WelcomeKudosAmount > 0)
            {
                KudosLog welcomeKudos = new KudosLog
                {
                    EmployeeId      = applicationUser.Id,
                    OrganizationId  = applicationUser.OrganizationId,
                    Comments        = welcomeKudosDTO.WelcomeKudosComment,
                    Points          = welcomeKudosDTO.WelcomeKudosAmount,
                    Created         = DateTime.UtcNow,
                    Modified        = DateTime.UtcNow,
                    Status          = KudosStatus.Pending,
                    MultiplyBy      = 1,
                    KudosSystemType = ConstBusinessLayer.KudosTypeEnum.Welcome,
                    KudosTypeValue  = (short)ConstBusinessLayer.KudosTypeEnum.Welcome,
                    KudosTypeName   = ConstBusinessLayer.KudosTypeEnum.Welcome.ToString()
                };

                _uow.GetDbSet <KudosLog>().Add(welcomeKudos);
            }
        }