public Task <int> AddAsync(VacationInfoTransferModel transferModel) { return(Task.Factory.StartNew(() => { var table = _connection.Table <VacationInfoTransferModel>(); transferModel.Id = table.Any() ? table.Max(x => x.Id) + 1 : 1; transferModel.ProcessInstanceId = "10" + transferModel.Id; _connection.Insert(transferModel, typeof(VacationInfoTransferModel)); return transferModel.Id; })); }
public async Task <int> AddVacation(VacationInfoTransferModel transferModel) { var response = await Post(VacationEndPoind, transferModel); if (!response.IsSuccessStatusCode) { throw new HttpRequestException("Not added!"); } var content = await response.Content.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <int>(content)); }
public VacationModel(VacationInfoTransferModel transferModel) { Id = transferModel.Id; _startDate = transferModel.StartDate; _endDate = transferModel.EndDate; _employeeId = transferModel.EmployeeId; _approverId = transferModel.ApproverId; _noProjectManagerObjections = transferModel.NoProjectManagerObjections; _comment = transferModel.Comment; _confirmationDocumentAvailable = transferModel.ConfirmationDocumentAvailable; _processInstanceId = transferModel.ProcessInstanceId; _status = transferModel.Status; _type = transferModel.Type; }
public Task UpdateVacation(VacationInfoTransferModel transferModel) { return(Post(VacationEndPoind, transferModel)); }
public Task <int> AddAsync(VacationInfoTransferModel transferModel) { return(CurrentState.AddAsync(transferModel)); }
public Task DeleteAsync(VacationInfoTransferModel transferModel) { return(CurrentState.DeleteAsync(transferModel)); }
public Task <int> AddAsync(VacationInfoTransferModel transferModel) { return(_restService.AddVacation(transferModel)); }
public Task DeleteAsync(VacationInfoTransferModel transferModel) { throw new NotImplementedException(); }
public Task UpdateAsync(VacationInfoTransferModel transferModel) { return(_restService.UpdateVacation(transferModel)); }
public Task DeleteAsync(VacationInfoTransferModel transferModel) { return(Task.Factory.StartNew( () => _connection.Delete <VacationInfoTransferModel>(transferModel.Id) )); }
public Task UpdateAsync(VacationInfoTransferModel transferModel) { return(Task.Factory.StartNew(() => _connection.Update(transferModel, typeof(VacationInfoTransferModel)))); }