Ejemplo n.º 1
0
        private int GetPaymentMaxDisplaySequence(PayApplicationType applicationType)
        {
            DbCommand sqlStringCommand = base.database.GetSqlStringCommand("select max(DisplaySequence) from Hishop_PaymentTypes where ApplicationType=@ApplicationType");

            base.database.AddInParameter(sqlStringCommand, "ApplicationType", DbType.Int32, applicationType);
            return(base.database.ExecuteScalar(sqlStringCommand).ToInt(0));
        }
Ejemplo n.º 2
0
        public int GetPaymentModeCount(PayApplicationType applicationType)
        {
            string str = "SELECT COUNT(ModeId) FROM Hishop_PaymentTypes WHERE Gateway <> 'hishop.plugins.payment.podrequest' AND Gateway<>'hishop.plugins.payment.bankrequest'";

            if (applicationType != 0)
            {
                str += " AND ApplicationType = @ApplicationType";
            }
            str += " AND ModeType = @ModeType";
            DbCommand sqlStringCommand = base.database.GetSqlStringCommand(str);

            base.database.AddInParameter(sqlStringCommand, "ApplicationType", DbType.Int32, (int)applicationType);
            base.database.AddInParameter(sqlStringCommand, "ModeType", DbType.Int32, 0);
            return(base.database.ExecuteScalar(sqlStringCommand).ToInt(0));
        }
Ejemplo n.º 3
0
        public IList <PaymentModeInfo> GetPaymentModes(PayApplicationType payApplicationType)
        {
            IList <PaymentModeInfo> result = null;
            string str = "SELECT * FROM Hishop_PaymentTypes WHERE 1 = 1 ";

            if (payApplicationType != 0)
            {
                str += " AND ApplicationType = @ApplicationType";
            }
            str += " AND ModeType = @ModeType";
            str += " Order by DisplaySequence desc";
            DbCommand sqlStringCommand = base.database.GetSqlStringCommand(str);

            base.database.AddInParameter(sqlStringCommand, "ApplicationType", DbType.Int32, (int)payApplicationType);
            base.database.AddInParameter(sqlStringCommand, "ModeType", DbType.Int32, 0);
            using (IDataReader objReader = base.database.ExecuteReader(sqlStringCommand))
            {
                result = DataHelper.ReaderToList <PaymentModeInfo>(objReader);
            }
            return(result);
        }
Ejemplo n.º 4
0
        public IList <PaymentModeInfo> GetPaymentModes(PayApplicationType payApplicationType)
        {
            IList <PaymentModeInfo> list = new List <PaymentModeInfo>();
            string text = "SELECT * FROM Ecshop_PaymentTypes";

            if (payApplicationType != PayApplicationType.payOnAll)
            {
                text += " where ApplicationType=@ApplicationType";
            }
            text += " Order by DisplaySequence desc";
            DbCommand sqlStringCommand = this.database.GetSqlStringCommand(text);

            this.database.AddInParameter(sqlStringCommand, "ApplicationType", DbType.Int32, (int)payApplicationType);
            using (IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                while (dataReader.Read())
                {
                    list.Add(DataMapper.PopulatePayment(dataReader));
                }
            }
            return(list);
        }
Ejemplo n.º 5
0
 public static IList <PaymentModeInfo> GetPaymentModes(PayApplicationType payApplicationType)
 {
     return(new List <PaymentModeInfo>()); //PaymentModeDao().GetPaymentModes(payApplicationType);
 }