public void InsertPayment(PaymentInfo payment) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[2]; objParams[0] = new SqlParameter("@UserName", payment.UserName); objParams[1] = new SqlParameter("@Dec", payment.Dec); objSqlHelper.ExecuteNonQuery("je_Pay_InsertPayment", objParams); }
public int UpdateOnLinePayment(PaymentInfo payment) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[5]; objParams[0] = new SqlParameter("@dynamicTitle", payment.PayName); objParams[1] = new SqlParameter("@titleCss", payment.Dec); objParams[2] = new SqlParameter("@titleCss", payment.UserName); objParams[3] = new SqlParameter("@dynamicTitle", payment.PrivateKey); objParams[4] = new SqlParameter("@titleCss", payment.PaymentID); return objSqlHelper.ExecuteNonQuery("je_Pay_DeletePayment", objParams); }
public int UpdatePayment(PaymentInfo payment) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[5]; objParams[0] = new SqlParameter("@UserName", payment.UserName); objParams[1] = new SqlParameter("@Dec", payment.Dec); objParams[2] = new SqlParameter("@PrivateKey", payment.PrivateKey); objParams[3] = new SqlParameter("@PartnerID", payment.PartnerID); objParams[4] = new SqlParameter("@PaymentID", payment.PaymentID); return objSqlHelper.ExecuteNonQuery("je_Pay_UpdatePayment", objParams); }
public PaymentInfo GetPaymentByID(int paymentID) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[1]; objParams[0] = new SqlParameter("@paymentID", SqlDbType.Int, 4); objParams[0].Value = paymentID; SqlDataReader reader = objSqlHelper.ExecuteReader("je_Pay_GetPaymentID", objParams); PaymentInfo item = new PaymentInfo(); while (reader.Read()) { item.PaymentID = reader.GetInt32(reader.GetOrdinal("paymentID")); item.PayName = reader.GetString(reader.GetOrdinal("paymentName")); item.PayType = reader.GetInt32(reader.GetOrdinal("paymentType")); item.OnLinePayType = reader.GetInt32(reader.GetOrdinal("OnLinePayType")); item.UserName = reader.GetString(reader.GetOrdinal("userName")); item.PrivateKey = reader.GetString(reader.GetOrdinal("PrivateKey")); item.PartnerID = reader.GetString(reader.GetOrdinal("PartnerID")); item.Dec = reader.GetString(reader.GetOrdinal("Dec")); item.Status = reader.GetBoolean(reader.GetOrdinal("Status")); } reader.Close(); return item; }
/// <summary> /// 删除支付方式 /// </summary> /// <param name="link"></param> /// <returns></returns> public static int DeletePayment(PaymentInfo payment) { return payments.DeletePayment(payment); }
/// <summary> /// 更新支付方式 /// </summary> /// <param name="link"></param> /// <returns></returns> public static int UpdatePayment(PaymentInfo payment) { return payments.UpdatePayment(payment); }
/// <summary> /// 添加支付方式 /// </summary> /// <param name="link"></param> public static void InsertPayment(PaymentInfo payment) { payments.InsertPayment(payment); }
public int DeletePayment(PaymentInfo payment) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[1]; objParams[0] = new SqlParameter("@paymentID", payment.PaymentID); return objSqlHelper.ExecuteNonQuery("je_Pay_DeletePayment", objParams); }