예제 #1
0
 public long AddRechargeBlance(RechargeRequestInfo rechargeRequest)
 {
     if (rechargeRequest != null)
     {
         DbCommand storedProcCommand = this.database.GetStoredProcCommand("sp_cf_rechargeRequest_Create");
         this.database.AddOutParameter(storedProcCommand, "Status", DbType.Int32, 4);
         this.database.AddOutParameter(storedProcCommand, "RechargeId", DbType.Int64, 10);
         this.database.AddInParameter(storedProcCommand, "TradeDate", DbType.DateTime, rechargeRequest.TradeDate);
         this.database.AddInParameter(storedProcCommand, "RechargeBlance", DbType.Currency, rechargeRequest.RechargeBlance);
         this.database.AddInParameter(storedProcCommand, "UserId", DbType.Int32, rechargeRequest.UserId);
         this.database.AddInParameter(storedProcCommand, "PaymentGateway", DbType.String, rechargeRequest.PaymentGateway);
         this.database.ExecuteNonQuery(storedProcCommand);
         if (((int) this.database.GetParameterValue(storedProcCommand, "Status")) == 0)
         {
             return (long) this.database.GetParameterValue(storedProcCommand, "RechargeId");
         }
     }
     return 0L;
 }
예제 #2
0
 public static long AddRechargeBalance(RechargeRequestInfo rechargeRequest)
 {
     return service.AddRechargeBlance(rechargeRequest);
 }