Beispiel #1
0
        /// <summary>
        /// get chaxun info
        /// </summary>
        /// <returns></returns>
        EyouSoft.Model.YlStructure.MLiPinKaDingDanChaXunInfo GetChaXunInfo()
        {
            var info = new EyouSoft.Model.YlStructure.MLiPinKaDingDanChaXunInfo();

            info.LiPinKaMingCheng = Utils.GetQueryStringValue("txtLiPinKaMingCheng");
            info.JiaoYiHao        = Utils.GetQueryStringValue("txtJiaoYiHao");
            info.XiaDanShiJian1   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtXiaDanShiJian1"));
            info.XiaDanShiJian2   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtXiaDanShiJian2"));

            return(info);
        }
Beispiel #2
0
        /// <summary>
        /// 获取礼品卡订单集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页序号</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.YlStructure.MLiPinKaDingDanInfo> GetLiPinKaDingDans(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.YlStructure.MLiPinKaDingDanChaXunInfo chaXun)
        {
            if (string.IsNullOrEmpty(companyId))
            {
                return(null);
            }

            return(dal.GetLiPinKaDingDans(companyId, pageSize, pageIndex, ref recordCount, chaXun));
        }
Beispiel #3
0
        /// <summary>
        /// 获取礼品卡订单集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页序号</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.YlStructure.MLiPinKaDingDanInfo> GetLiPinKaDingDans(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.YlStructure.MLiPinKaDingDanChaXunInfo chaXun)
        {
            IList <EyouSoft.Model.YlStructure.MLiPinKaDingDanInfo> items = new List <EyouSoft.Model.YlStructure.MLiPinKaDingDanInfo>();
            string        tableName     = "view_YL_LiPinKaDingDan";
            string        fields        = "*";
            string        orderByString = "IssueTime DESC";
            string        sumString     = string.Empty;
            StringBuilder sql           = new StringBuilder();

            sql.AppendFormat(" CompanyId='{0}' ", companyId);

            if (chaXun != null)
            {
                if (!string.IsNullOrEmpty(chaXun.HuiYuanId))
                {
                    sql.AppendFormat(" AND XiaDanRenId='{0}' ", chaXun.HuiYuanId);
                }
                if (!string.IsNullOrEmpty(chaXun.JiaoYiHao))
                {
                    sql.AppendFormat(" AND JiaoYiHao LIKE '%{0}%' ", chaXun.JiaoYiHao);
                }
                if (!string.IsNullOrEmpty(chaXun.LiPinKaMingCheng))
                {
                    sql.AppendFormat(" AND LiPinKaMingCheng LIKE '%{0}%' ", chaXun.LiPinKaMingCheng);
                }
                if (chaXun.LiPinKaLeiXing.HasValue)
                {
                    sql.AppendFormat(" AND LiPinKaLeiXing={0} ", (int)chaXun.LiPinKaLeiXing.Value);
                }
                if (chaXun.XiaDanShiJian1.HasValue)
                {
                    sql.AppendFormat(" AND IssueTime>='{0}' ", chaXun.XiaDanShiJian1.Value);
                }
                if (chaXun.XiaDanShiJian2.HasValue)
                {
                    sql.AppendFormat(" AND IssueTime<='{0}' ", chaXun.XiaDanShiJian2.Value.AddDays(1).AddMinutes(-1));
                }
            }

            using (IDataReader rdr = DbHelper.ExecuteReader1(_db, pageSize, pageIndex, ref recordCount, tableName, fields.ToString(), sql.ToString(), orderByString, sumString))
            {
                while (rdr.Read())
                {
                    var info = new EyouSoft.Model.YlStructure.MLiPinKaDingDanInfo();

                    info.CompanyId            = rdr["CompanyId"].ToString();
                    info.DingDanId            = rdr["DingDanId"].ToString();
                    info.DingDanStatus        = (EyouSoft.Model.EnumType.YlStructure.LiPinKaDingDanStatus)rdr.GetByte(rdr.GetOrdinal("DingDanStatus"));
                    info.FaPiaoDiZhiId        = rdr["FaPiaoDiZhiId"].ToString();
                    info.FaPiaoKuaiDiJinE     = rdr.GetDecimal(rdr.GetOrdinal("FaPiaoKuaiDiJinE"));
                    info.FaPiaoLeiXing        = rdr["FaPiaoLeiXing"].ToString();
                    info.FaPiaoMingXi         = rdr["FaPiaoMingXi"].ToString();
                    info.FaPiaoPeiSongFangShi = (EyouSoft.Model.EnumType.YlStructure.FaPiaoPeiSongFangShi)rdr.GetByte(rdr.GetOrdinal("FaPiaoPeiSongFangShi"));
                    info.FaPiaoTaiTou         = rdr["FaPiaoTaiTou"].ToString();
                    info.FuKuanStatus         = (EyouSoft.Model.EnumType.YlStructure.FuKuanStatus)rdr.GetByte(rdr.GetOrdinal("FuKuanStatus"));
                    info.IssueTime            = rdr.GetDateTime(rdr.GetOrdinal("IssueTime"));
                    info.IsXuYaoFaPiao        = rdr["IsXuYaoFaPiao"].ToString() == "1";
                    info.JiaoYiHao            = rdr["JiaoYiHao"].ToString();
                    info.JinE              = rdr.GetDecimal(rdr.GetOrdinal("JinE"));
                    info.JinE1             = rdr.GetDecimal(rdr.GetOrdinal("JinE1"));
                    info.LiPinKaId         = rdr["LiPinKaId"].ToString();
                    info.LiPinKaKuaiDiJinE = rdr.GetDecimal(rdr.GetOrdinal("LiPinKaKuaiDiJinE"));
                    info.ShuLiang          = rdr.GetInt32(rdr.GetOrdinal("ShuLiang"));
                    info.SlrDiZhiId        = rdr["SlrDiZhiId"].ToString();
                    info.XiaDanBeiZhu      = rdr["XiaDanBeiZhu"].ToString();
                    info.XiaDanRenId       = rdr["XiaDanRenId"].ToString();
                    info.YuDingRenDianHua  = rdr["YuDingRenDianHua"].ToString();
                    info.YuDingRenName     = rdr["YuDingRenName"].ToString();
                    info.YuDingRenShouJi   = rdr["YuDingRenShouJi"].ToString();
                    info.YuDingRenYouXiang = rdr["YuDingRenYouXiang"].ToString();
                    info.ZengYu            = rdr["ZengYu"].ToString();

                    info.LiPinKaLeiXing   = (EyouSoft.Model.EnumType.YlStructure.LiPinKaLeiXing)rdr.GetByte(rdr.GetOrdinal("LiPinKaLeiXing"));
                    info.LiPinKaMingCheng = rdr["LiPinKaMingCheng"].ToString();
                    info.HuiYuanXingMing  = rdr["HuiYuanXingMing"].ToString();

                    items.Add(info);
                }
            }

            return(items);
        }