Пример #1
0
        /// <summary>
        /// Select Property Default Models method
        /// </summary>
        /// <param name="workingObjects"></param>
        /// <param name="bot"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <param name="parameters"></param>
        /// <param name="db"></param>
        private void Selectpayments
        (
            IDictionary <object, object> workingObjects
            , RPComponents.IBusinessObjectTransaction bot
            , SqlConnection connection
            , SqlTransaction transaction
            , Hashtable parameters
            , IundefinedDB db
        )
        {
            db.SetNullParameters();
            db.SetParameters(db.Getpayment);

            using
            (
                SqlDataReader reader = ExecuteSqlDataReader
                                       (
                    db.Getpayment
                    , parameters
                    , connection
                    , transaction
                                       )
            )
            {
                IList <Ipayment> payment = new List <Ipayment>();
                while (reader.Read())
                {
                    Ipayment bob = (Ipayment)db.BuildObject(reader);
                    payment.Add(bob);
                    bot.Status = new TransactionStatus(TransactionStatus.Succeeded);
                }
                workingObjects.Add(WorkingTypes.payment, payment);
                if (bot.Status.IsInitial)
                {
                    bot.Status = new TransactionStatus(TransactionStatus.Succeeded);
                }
            }
        }
Пример #2
0
 public paymentsController(Ipayment payment)
 {
     this._payment = payment;
 }
Пример #3
0
        /// <summary>
        ///  Get payment  list
        /// </summary>
        /// <param name="inputObjects">This is the dictionary of arraylists of
        /// business object transactions specified by the caller. This typically hails
        /// from the web service or page class and simply passed from one object in the
        /// chain to another until it is referenced here.</param>
        /// <param name="globals">This is a dictionary where the keys are intended to hold globally
        /// unique values used to establish relationships between collections of business object
        /// transactions in the inputObjects dictionary. The objects corresponding to each key
        /// are intended to be a instance of the KeyResolver class.</param>
        /// <param name="prototype">payment object</param>
        /// <returns>List of payment</returns>
        public List <Ipayment> Getpayment(IDictionary <object, object> inputObjects, IDictionary <object, object> globals, Ipayment prototype)
        {
            IDictionary <object, object> workingObjects = new Dictionary <object, object>();

            try
            {
                _cm.Init(base.Env, base.Server);
                _cm.Connect(DBEntity.PMC, base.PmcID, base.SiteID, base.UserID);
                _dao.CM = _cm;
                RPComponents.IBusinessObjectTransaction         bot  = new RPComponents.BusinessObjectTransaction();
                IList <RPComponents.IBusinessObjectTransaction> bots = new List <RPComponents.IBusinessObjectTransaction>();
                bot.BusinessObject = prototype;
                bot.RequestType    = undefinedDAO.RequestTypes.payment;
                bot.Action         = new RPComponents.Action(RPComponents.Action.Select);
                bots.Add(bot);
                _dao.ProcessTransactions(inputObjects, workingObjects, globals, bots);
            }
            finally
            {
                _cm.Disconnect();
            }
            List <Ipayment> list = (List <Ipayment>)workingObjects[undefinedDAO.WorkingTypes.payment];

            return(list);
        }