Ejemplo n.º 1
0
        public async Task Update(DayTimeReportViewModel viewModel)
        {
            TimeReport newTimeReport = viewModel.ToTimeReport(await GetUserId());
            TimeReportUpdateStrategy timeReportUpdateStrategy = await GetTimeReportUpdateStrategy(newTimeReport);

            timeReportUpdateStrategy.Update();
        }
Ejemplo n.º 2
0
        public async Task <int> AddTimeReport(DayTimeReportViewModel viewModel)
        {
            TimeReport timeReport = viewModel.ToTimeReport(await GetUserId());

            timeReport.Id = GlobalConstants.NullId;
            CreateTimeReportUpdateStrategy timeReportUpdateStrategy = (CreateTimeReportUpdateStrategy)(await GetTimeReportUpdateStrategy(timeReport));

            timeReportUpdateStrategy.Update();
            return(timeReportUpdateStrategy.NewTimeReportId);
        }