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

            info.MingCheng = Utils.GetQueryStringValue("txtMingCheng");
            info.LeiXing   = (EyouSoft.Model.EnumType.YlStructure.LiPinKaLeiXing?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.YlStructure.LiPinKaLeiXing), Utils.GetQueryStringValue("txtLeiXing"));

            return(info);
        }
示例#2
0
        /// <summary>
        /// init dainzika
        /// </summary>
        void InitDianZiKa()
        {
            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MLiPinKaChaXunInfo();

            chaXun.LeiXing = EyouSoft.Model.EnumType.YlStructure.LiPinKaLeiXing.电子卡;
            var items = new EyouSoft.BLL.YlStructure.BLiPinKa().GetLiPinKas(YuMingInfo.CompanyId, 5, 1, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                rpt2.DataSource = items;
                rpt2.DataBind();
            }
        }
示例#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.MLiPinKaInfo> GetLiPinKas(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.YlStructure.MLiPinKaChaXunInfo chaXun)
        {
            if (string.IsNullOrEmpty(companyId))
            {
                return(null);
            }

            return(dal.GetLiPinKas(companyId, pageSize, pageIndex, ref recordCount, chaXun));
        }
示例#4
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.MLiPinKaInfo> GetLiPinKas(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.YlStructure.MLiPinKaChaXunInfo chaXun)
        {
            IList <EyouSoft.Model.YlStructure.MLiPinKaInfo> items = new List <EyouSoft.Model.YlStructure.MLiPinKaInfo>();
            string        tableName     = "tbl_YL_WZ_LiPinKa";
            string        fields        = "*";
            string        orderByString = "IssueTime DESC";
            string        sumString     = string.Empty;
            StringBuilder sql           = new StringBuilder();

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

            if (chaXun != null)
            {
                if (chaXun.LeiXing.HasValue)
                {
                    sql.AppendFormat(" AND LeiXing={0} ", (int)chaXun.LeiXing.Value);
                }
                if (!string.IsNullOrEmpty(chaXun.MingCheng))
                {
                    sql.AppendFormat(" AND MingCheng LIKE '%{0}%' ", chaXun.MingCheng);
                }
            }

            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.MLiPinKaInfo();

                    info.CompanyId         = rdr["CompanyId"].ToString();
                    info.FaPiaoKuaiDiJinE  = rdr.GetDecimal(rdr.GetOrdinal("FaPiaoKuaiDiJinE"));
                    info.FengMian          = rdr["FengMian"].ToString();
                    info.IssueTime         = rdr.GetDateTime(rdr.GetOrdinal("IssueTime"));
                    info.JinE              = rdr.GetDecimal(rdr.GetOrdinal("JinE"));
                    info.JinE1             = rdr.GetDecimal(rdr.GetOrdinal("JinE1"));
                    info.LeiXing           = (EyouSoft.Model.EnumType.YlStructure.LiPinKaLeiXing)rdr.GetByte(rdr.GetOrdinal("LeiXing"));
                    info.LiPinKaId         = rdr["LiPinKaId"].ToString();
                    info.LiPinKaKuaiDiJinE = rdr.GetDecimal(rdr.GetOrdinal("LiPinKaKuaiDiJinE"));
                    info.MiaoShu           = rdr["MiaoShu"].ToString();
                    info.MingCheng         = rdr["MingCheng"].ToString();
                    info.OperatorId        = rdr["OperatorId"].ToString();

                    items.Add(info);
                }
            }

            return(items);
        }