Esempio n. 1
0
        public async Task <string> GetCurrentCallNumberAsync(int departmentId)
        {
            int year = DateTime.UtcNow.Year;

            var count = (await _callsRepository.GetAllCallsByDepartmentDateRangeAsync(departmentId, new DateTime(year - 1, 12, 30), new DateTime(year, 12, 31))).Count(x => x.LoggedOn.Year == year) + 1;

            return(string.Format("{0}-{1}", year % 100, count));
        }