public async Task <UpdateTransactionResponse> PutExistingTransactionRecord(Transaction transactionUpdateRequest, ICloudantService cloudantService = null) { if (cloudantService != null) { var response = await cloudantService.UpdateAsync(transactionUpdateRequest, DBNames.transaction.ToString()); return(JsonConvert.DeserializeObject <UpdateTransactionResponse>(response)); } else { return(new UpdateTransactionResponse()); } }
public async Task <dynamic> Update([FromBody] LoginUsers loginuser) { if (_cloudantService != null) { return(await _cloudantService.UpdateAsync(loginuser)); //Console.WriteLine("Update RESULT " + response); //return new string[] { employee.IBMEmailID, employee._id, employee._rev }; //return JsonConvert.DeserializeObject<UpdateEmployeeResponse>(response.Result); } else { return(new string[] { "No database connection" }); } }
public async Task <UpdateLoginUsersResponse> PutExistingUserRecord(LoginUsers loginuserUpdateRequest, ICloudantService cloudantService = null) { //AuditData auditData = new AuditData(); //auditData.eventname = "edit"; //auditData.loginid = employeeUpdateRequest.loginid; //auditData.datetime = System.DateTime.UtcNow.ToString(); //auditData.empid = employeeUpdateRequest.FormattedEmployeedId; if (cloudantService != null) { var response = await cloudantService.UpdateAsync(loginuserUpdateRequest, DBNames.loginusers.ToString()); //var audit = await cloudantService.CreateAsync(auditData, DBNames.auditdata.ToString()); return(JsonConvert.DeserializeObject <UpdateLoginUsersResponse>(response)); } else { return(new UpdateLoginUsersResponse()); } }
public async Task <string> Update(ToDoItem item) { return(await _cloudantService.UpdateAsync(item)); }
public async Task <dynamic> Update(Schedule item) { return(await _cloudantService.UpdateAsync(item)); }