Пример #1
0
        public async Task CreatePromotion(CreatePromotionDto input)
        {
            var header = _employeeRepository.Get(input.EmployeeId);

            var @employeepromotion = input.MapTo <Promotion>();

            @employeepromotion.TenantId = AbpSession.GetTenantId();

            @employeepromotion = Promotion.Create(input.FromDesignation, input.ToDesignation, input.PromotedDate.Value, input.JobDescription, input.Remark);

            header.Promotions.Add(@employeepromotion);

            await CurrentUnitOfWork.SaveChangesAsync();
        }