コード例 #1
0
        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());
            }
        }
コード例 #2
0
        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" });
            }
        }
コード例 #3
0
        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());
            }
        }
コード例 #4
0
ファイル: DbController.cs プロジェクト: Smsemosa/BlueMixYet
 public async Task <string> Update(ToDoItem item)
 {
     return(await _cloudantService.UpdateAsync(item));
 }
コード例 #5
0
 public async Task <dynamic> Update(Schedule item)
 {
     return(await _cloudantService.UpdateAsync(item));
 }