Ejemplo n.º 1
0
 public string Repayment([FromBody] Repay repayment)
 {
     Trans trans = new Trans();
     trans.From = repayment.Repay_Account;
     trans.Amount = repayment.Amount;
     trans.To = repayment.Credit_Account;
     trans.User_Id = repayment.User_Id;
     trans.Type = repayment.Type;
        // return "Success";
     MysqlHelper mysqlhelper = new MysqlHelper();
     var status = mysqlhelper.ChecktheAccount(ref trans);
     if (status == "success")
     {
         mysqlhelper.PushToRepayLog(repayment);
         return mysqlhelper.UpdateAccount(trans);
     }
     else
     {
         return status;
     }
 }