コード例 #1
0
ファイル: payment.cs プロジェクト: refinedKing/Hoto-cms
 /// <summary>
 /// 返回支付列表
 /// </summary>
 /// <param name="top">显示条数</param>
 /// <param name="strwhere">查询条件</param>
 /// <returns>DataTable</returns>
 protected DataTable get_payment_list(int top, string strwhere)
 {
     DataTable dt = new DataTable();
     string _where = "is_lock=0";
     if (!string.IsNullOrEmpty(strwhere))
     {
         _where += " and " + strwhere;
     }
     dt = new Hoto.BLL.payment().GetList(top, _where, "sort_id asc,id desc").Tables[0];
     return dt;
 }
コード例 #2
0
ファイル: payment.cs プロジェクト: w1146869587/Hoto-cms
        /// <summary>
        /// 返回支付列表
        /// </summary>
        /// <param name="top">显示条数</param>
        /// <param name="strwhere">查询条件</param>
        /// <returns>DataTable</returns>
        protected DataTable get_payment_list(int top, string strwhere)
        {
            DataTable dt     = new DataTable();
            string    _where = "is_lock=0";

            if (!string.IsNullOrEmpty(strwhere))
            {
                _where += " and " + strwhere;
            }
            dt = new Hoto.BLL.payment().GetList(top, _where, "sort_id asc,id desc").Tables[0];
            return(dt);
        }
コード例 #3
0
ファイル: orders.cs プロジェクト: w1146869587/Hoto-cms
        /// <summary>
        /// 返回订单状态
        /// </summary>
        /// <param name="_id">订单ID</param>
        /// <returns>String</returns>
        protected string get_order_status(int _id)
        {
            string _title = "";

            Hoto.Model.orders model = new Hoto.BLL.orders().GetModel(_id);
            switch (model.status)
            {
            case 1:
                _title = "等待确认";
                Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(model.payment_id);
                if (payModel != null && payModel.type == 1)
                {
                    if (model.payment_status > 1)
                    {
                        _title = "付款成功";
                    }
                    else
                    {
                        _title = "等待付款";
                    }
                }
                break;

            case 2:
                if (model.distribution_status > 1)
                {
                    _title = "已发货";
                }
                else
                {
                    _title = "待发货";
                }
                break;

            case 3:
                _title = "交易完成";
                break;

            case 4:
                _title = "订单取消";
                break;

            case 5:
                _title = "订单作废";
                break;
            }

            return(_title);
        }
コード例 #4
0
ファイル: payment.cs プロジェクト: refinedKing/Hoto-cms
 /// <summary>
 /// 返回支付费用金额
 /// </summary>
 /// <param name="payment_id">支付ID</param>
 /// <returns>decimal</returns>
 protected decimal get_payment_poundage_amount(int payment_id)
 {
     int group_id = 0;
     Hoto.Model.users userModel = GetUserInfo();
     if (userModel != null)
     {
         group_id = userModel.group_id;
     }
     Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(payment_id);
     if (payModel == null)
     {
         return 0;
     }
     decimal poundage_amount = payModel.poundage_amount;
     if (payModel.poundage_type == 1)
     {
         poundage_amount = (poundage_amount * Web.UI.ShopCart.GetTotal(group_id).real_amount) / 100;
     }
     return poundage_amount;
 }
コード例 #5
0
ファイル: orders.cs プロジェクト: refinedKing/Hoto-cms
 /// <summary>
 /// 返回订单是否需要在线支付
 /// </summary>
 /// <param name="order_id">订单ID</param>
 /// <returns>bool</returns>
 protected bool get_order_payment_status(int order_id)
 {
     Hoto.Model.orders model = new Hoto.BLL.orders().GetModel(order_id);
     if (model == null)
     {
         return false;
     }
     if (model.status > 1)
     {
         return false;
     }
     Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(model.payment_id);
     if (payModel == null)
     {
         return false;
     }
     if (payModel.type == 1 && model.payment_status == 1)
     {
         return true;
     }
     return false;
 }
コード例 #6
0
ファイル: orders.cs プロジェクト: w1146869587/Hoto-cms
 /// <summary>
 /// 返回订单是否需要在线支付
 /// </summary>
 /// <param name="order_id">订单ID</param>
 /// <returns>bool</returns>
 protected bool get_order_payment_status(int order_id)
 {
     Hoto.Model.orders model = new Hoto.BLL.orders().GetModel(order_id);
     if (model == null)
     {
         return(false);
     }
     if (model.status > 1)
     {
         return(false);
     }
     Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(model.payment_id);
     if (payModel == null)
     {
         return(false);
     }
     if (payModel.type == 1 && model.payment_status == 1)
     {
         return(true);
     }
     return(false);
 }
コード例 #7
0
ファイル: payment.cs プロジェクト: w1146869587/Hoto-cms
        /// <summary>
        /// 返回支付费用金额
        /// </summary>
        /// <param name="payment_id">支付ID</param>
        /// <returns>decimal</returns>
        protected decimal get_payment_poundage_amount(int payment_id)
        {
            int group_id = 0;

            Hoto.Model.users userModel = GetUserInfo();
            if (userModel != null)
            {
                group_id = userModel.group_id;
            }
            Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(payment_id);
            if (payModel == null)
            {
                return(0);
            }
            decimal poundage_amount = payModel.poundage_amount;

            if (payModel.poundage_type == 1)
            {
                poundage_amount = (poundage_amount * Web.UI.ShopCart.GetTotal(group_id).real_amount) / 100;
            }
            return(poundage_amount);
        }
コード例 #8
0
ファイル: orders.cs プロジェクト: refinedKing/Hoto-cms
        /// <summary>
        /// 返回订单状态
        /// </summary>
        /// <param name="_id">订单ID</param>
        /// <returns>String</returns>
        protected string get_order_status(int _id)
        {
            string _title = "";
            Hoto.Model.orders model = new Hoto.BLL.orders().GetModel(_id);
            switch (model.status)
            {
                case 1:
                    _title = "等待确认";
                    Hoto.Model.payment payModel = new Hoto.BLL.payment().GetModel(model.payment_id);
                    if (payModel != null && payModel.type == 1)
                    {
                        if (model.payment_status > 1)
                        {
                            _title = "付款成功";
                        }
                        else
                        {
                            _title = "等待付款";
                        }
                    }
                    break;
                case 2:
                    if (model.distribution_status > 1)
                    {
                        _title = "已发货";
                    }
                    else
                    {
                        _title = "待发货";
                    }
                    break;
                case 3:
                    _title = "交易完成";
                    break;
                case 4:
                    _title = "订单取消";
                    break;
                case 5:
                    _title = "订单作废";
                    break;
            }

            return _title;
        }