/// <summary>
        //
        /// </summary>
        /// <param name="userId"></param>
        /// <returns>An IEnumerable set of PaymentInfo</returns>
        public static IEnumerable<PaymentInfo> LoadByUserId(Guid userId)
        {
            SearchPaymentInfo search = new SearchPaymentInfo
            {
                UserId = userId
            };

            return Search(search);
        }
 /// <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();
 }
Esempio n. 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("@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(KarzPlusConnectionString, "PKP_GetPaymentInfo", parameters);
            IEnumerable<DataRow> dataRows = set.GetRowsFromDataSet();
            return ConvertToEntityObject(dataRows);
        }
        public static IEnumerable<PaymentInfo> LoadAll()
        {
            SearchPaymentInfo search = new SearchPaymentInfo();

            return Search(search);
        }
 /// <summary>
 /// Searches for PaymentInfo
 /// </summary>
 /// <param name="search" />
 /// <returns>An IEnumerable set of PaymentInfo</returns>
 public static IEnumerable<PaymentInfo> Search(SearchPaymentInfo search)
 {
     return search == null ? new List <PaymentInfo>() : PaymentInfoDao.Search(search);
 }