Beispiel #1
0
 public string Swift(Swift swift)
 {
     Trans tran = new Trans();
     tran.Amount = swift.Payer_Amount;
     tran.From = swift.Payer_Account_Num;
     MysqlHelper mysqlhelper = new MysqlHelper();
     var status1 = mysqlhelper.ChecktheAccount(ref tran);
     if (status1 != "success")
         return status1;
     var status =  mysqlhelper.OverSeaTrans(swift);
     return status;
 }
Beispiel #2
0
        public string CheckAndChange(Trans trans)
        {
            MysqlHelper mysqlhelper = new MysqlHelper();
            var status = mysqlhelper.ChecktheAccount(ref trans);
            if (status == "success")
            {

                return mysqlhelper.UpdateAccount(trans);
            }
            else
            {
                return status;
            }
        }
Beispiel #3
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;
     }
 }