Esempio n. 1
0
        /// <summary>
        /// 查询配送方式支付方式关联信息
        /// </summary>
        /// <param name="pager">配送方式支付方式关联列表分页对象</param>
        /// <param name="filter">配送方式支付方式关联查询条件</param>
        /// <returns></returns>
        /// <remarks>
        /// 2013-08-02 郑荣华 创建
        /// </remarks>
        public override void GetBsDeliveryPaymentList(ref Pager <CBBsDeliveryPayment> pager, ParaBsDeliveryPaymentFilter filter)
        {
            const string whereSql = @"(@paymentsysno is null or t.paymentsysno=@paymentsysno)
                                       and (@deliverysysno is null or t.deliverysysno=@deliverysysno )
                                       and (@parentsysno is null or b.parentsysno=@parentsysno)
                                       and (@paymenttype is null or a.paymenttype=@paymenttype)
                                       and b.parentsysno<>0 "; //去掉第一级配送方式

            const string sqlcount = @"select count(1) from BsDeliveryPayment t 
                                      left join bspaymenttype a on t.paymentsysno=a.sysno
                                      left join lgdeliverytype b on t.deliverysysno=b.sysno
                                      where " + whereSql;

            const string fromSql = @"BsDeliveryPayment t 
                                     left join bspaymenttype a on t.paymentsysno=a.sysno
                                     left join lgdeliverytype b on t.deliverysysno=b.sysno
                                     left join lgdeliverytype c on b.parentsysno=c.sysno";

            using (var context = Context.UseSharedConnection(true))
            {
                pager.TotalRows = context.Sql(sqlcount)
                                  .Parameter("paymentsysno", filter.PaymentSysNo)
                                  //.Parameter("paymentsysno", filter.PaymentSysNo)
                                  .Parameter("deliverysysno", filter.DeliverySysNo)
                                  //.Parameter("deliverysysno", filter.DeliverySysNo)
                                  .Parameter("parentsysno", filter.ParentSysNo)
                                  //.Parameter("parentsysno", filter.ParentSysNo)
                                  .Parameter("paymenttype", filter.PaymentType)
                                  //.Parameter("paymenttype", filter.PaymentType)
                                  .QuerySingle <int>();

                pager.Rows = context.Select <CBBsDeliveryPayment>(@"t.*,a.paymentname,a.paymenttype,a.isonlinepay,
                                     b.parentsysno,b.deliverytypename,c.deliverytypename parentname")
                             .From(fromSql)
                             .Where(whereSql)
                             .Parameter("paymentsysno", filter.PaymentSysNo)
                             //.Parameter("paymentsysno", filter.PaymentSysNo)
                             .Parameter("deliverysysno", filter.DeliverySysNo)
                             //.Parameter("deliverysysno", filter.DeliverySysNo)
                             .Parameter("parentsysno", filter.ParentSysNo)
                             //.Parameter("parentsysno", filter.ParentSysNo)
                             .Parameter("paymenttype", filter.PaymentType)
                             //.Parameter("paymenttype", filter.PaymentType)
                             .OrderBy("t.deliverysysno,t.PaymentSysNo")
                             .Paging(pager.CurrentPage, pager.PageSize)
                             .QueryMany();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 查询配送方式支付方式关联信息
 /// </summary>
 /// <param name="pager">配送方式支付方式关联列表分页对象</param>
 /// <param name="filter">配送方式支付方式关联查询条件</param>
 /// <returns></returns>
 /// <remarks>
 /// 2013-08-02 郑荣华 创建
 /// </remarks>
 public abstract void GetBsDeliveryPaymentList(ref Pager <CBBsDeliveryPayment> pager,
                                               ParaBsDeliveryPaymentFilter filter);
Esempio n. 3
0
 /// <summary>
 /// 查询配送方式支付方式关联信息
 /// </summary>
 /// <param name="pager">配送方式支付方式关联列表分页对象</param>
 /// <param name="filter">配送方式支付方式关联查询条件</param>
 /// <returns></returns>
 /// <remarks>
 /// 2013-08-02 郑荣华 创建
 /// </remarks>
 public void GetListByPayment(ref Pager <CBBsDeliveryPayment> pager, ParaBsDeliveryPaymentFilter filter)
 {
     IBsDeliveryPaymentDao.Instance.GetBsDeliveryPaymentList(ref pager, filter);
 }