コード例 #1
0
 /// <summary>
 /// Loads PaymentInfo by the id parameter
 /// </summary>
 /// <param name="paymentInfoId">Primary Key of PaymentInfo table</param>
 /// <returns>PaymentInfo entity</returns>
 public static PaymentInfo Load(int paymentInfoId)
 {
     SearchPaymentInfo search
         = new SearchPaymentInfo
             {
                 PaymentInfoId = paymentInfoId
             };
     return Search(search).FirstOrDefault();
 }
コード例 #2
0
        public static IEnumerable<PaymentInfo> LoadByUserId(Guid userId)
        {
            SearchPaymentInfo search = new SearchPaymentInfo
            {
                UserId = userId
            };

            return Search(search);
        }
コード例 #3
0
        /// <summary>
        /// Searches for PaymentInfo
        /// </summary>
        /// <param name="item" />
        /// <returns>An IEnumerable set of PaymentInfo</returns>
        public static IEnumerable<PaymentInfo> Search(SearchPaymentInfo item)
        {
            List<SqlParameter> parameters
                = new List<SqlParameter>
                    {
                        new SqlParameter("@PaymentInfoId", item.PaymentInfoId),
                        new SqlParameter("@UserId", item.UserId),
                        new SqlParameter("@CreditCardNumber", item.CreditCardNumber),
                        new SqlParameter("@CreditCardTypeId", item.CreditCardType),
                        new SqlParameter("@ExpirationDate", item.ExpirationDate),
                        new SqlParameter("@CCV", item.CCV),
                        new SqlParameter("@BillingAddress", item.BillingAddress),
                        new SqlParameter("@BillingCity", item.BillingCity),
                        new SqlParameter("@BillingState", item.BillingState),
                        new SqlParameter("@BillingZip", item.BillingZip)
                    };

            DataSet set = DataManager.ExecuteProcedure(ConferencePlusConnectionString, "PaymentInfo_Get", parameters);
            IEnumerable<DataRow> dataRows = set.GetRowsFromDataSet();
            return ConvertToEntityObject(dataRows);
        }
コード例 #4
0
 /// <summary>
 /// Searches for PaymentInfo
 /// </summary>
 /// <param name="search" />
 /// <returns>An IEnumerable set of PaymentInfo</returns>
 public static IEnumerable<PaymentInfo> Search(SearchPaymentInfo search)
 {
     return PaymentInfoDao.Search(search);
 }