Пример #1
0
        /// <summary>
        /// Searches for Transaction
        /// </summary>
        /// <param name="item" />
        /// <returns>An IEnumerable set of Transaction</returns>
        public static IEnumerable<Transaction> Search(SearchTransaction item)
        {
            List<SqlParameter> parameters
                = new List<SqlParameter>
                    {
                        new SqlParameter("@TransactionId", item.TransactionId),
                        new SqlParameter("@EventId", item.EventId),
                        new SqlParameter("@UserId", item.UserId),
                        new SqlParameter("@FeeTypeId", item.FeeType),
                        new SqlParameter("@FeeAdjustmentId", item.FeeAdjustment),
                        new SqlParameter("@Fee", item.Fee),
                        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),
                        new SqlParameter("@TransactionDate", item.TransactionDate)
                    };

            DataSet set = DataManager.ExecuteProcedure(ConferencePlusConnectionString, "Transaction_Get", parameters);
            IEnumerable<DataRow> dataRows = set.GetRowsFromDataSet();
            return ConvertToEntityObject(dataRows);
        }
 /// <summary>
 /// Loads Transaction by the id parameter
 /// </summary>
 /// <param name="transactionId">Primary Key of Transaction table</param>
 /// <returns>Transaction entity</returns>
 public static Transaction Load(int transactionId)
 {
     SearchTransaction search
         = new SearchTransaction
             {
                 TransactionId = transactionId
             };
     return Search(search).FirstOrDefault();
 }
 /// <summary>
 /// Searches for Transaction
 /// </summary>
 /// <param name="search" />
 /// <returns>An IEnumerable set of Transaction</returns>
 public static IEnumerable<Transaction> Search(SearchTransaction search)
 {
     return TransactionDao.Search(search);
 }