コード例 #1
0
        /// <summary>
        /// 分页获取集合
        /// </summary>
        /// <param name="textWhere">string 条件语句,无须where</param>
        /// <param name="textOrder">string 排序语句,无须order by</param>
        /// <param name="pageIndex">int 页码,从1开始</param>
        /// <param name="pageRow">int 每页行数</param>
        /// <param name="dataCount">out int 数据行数</param>
        /// <returns>List<TwdPullOrderDetailInfo></returns>
        public List <VmiPullOrderDetailInfo> GetListByPage(string textWhere, string textOrder, int pageIndex, int pageRow, out int dataCount)
        {
            textWhere += "and isnull([ASN_CONFIRM_QTY],0) < isnull([REQUIRED_PART_QTY],0) " +
                         "and [ORDER_FID] in (select [FID] from [LES].[TT_MPM_VMI_PULL_ORDER] with(nolock) " +
                         "where [VALID_FLAG] = 1 and [ORDER_STATUS] = " + (int)PullOrderStatusConstants.Released + ")";
            dataCount = dal.GetCounts(textWhere);
            List <VmiPullOrderDetailInfo> vmiPullOrderDetailInfos = dal.GetListByPage(textWhere, textOrder, pageIndex, pageRow);
            ///
            string vmi_asn_default_calculate_asn_qty = new ConfigDAL().GetValueByCode("VMI_ASN_DEFAULT_CALCULATE_ASN_QTY");

            if (!string.IsNullOrEmpty(vmi_asn_default_calculate_asn_qty) && vmi_asn_default_calculate_asn_qty.ToLower() == "true")
            {
                ///默认预发货数量
                vmiPullOrderDetailInfos.ForEach(delegate(VmiPullOrderDetailInfo info)
                {
                    info.AsnQty = info.RequiredPartQty.GetValueOrDefault() - info.AsnDraftQty.GetValueOrDefault() - info.AsnConfirmQty.GetValueOrDefault();
                });
            }
            return(vmiPullOrderDetailInfos);
        }
コード例 #2
0
 /// <summary>
 /// 分页获取集合
 /// </summary>
 /// <param name="textWhere">string 条件语句,无须where</param>
 /// <param name="textOrder">string 排序语句,无须order by</param>
 /// <param name="pageIndex">int 页码,从1开始</param>
 /// <param name="pageRow">int 每页行数</param>
 /// <param name="dataCount">out int 数据行数</param>
 /// <returns>List<TwdPullOrderDetailInfo></returns>
 public List <VmiPullOrderDetailInfo> GetListByPage(string textWhere, string textOrder, int pageIndex, int pageRow, out int dataCount)
 {
     dataCount = dal.GetCounts(textWhere);
     return(dal.GetListByPage(textWhere, textOrder, pageIndex, pageRow));
 }