コード例 #1
0
        //申请开通高级网店
        private void AddEShop()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你的公司目前还未审核!'}]");
                Response.End();
                return;
            }
            ContactName = Utils.GetFormValue("HighApplication_AppName");
            Tel         = Utils.GetFormValue("HighApplication_Tel");
            Mobile      = Utils.GetFormValue("HighApplication_Mobile");
            Address     = Utils.GetFormValue("HighApplication_Address");
            CompanyName = Utils.GetFormValue("HighApplication_CompanyName");
            if (!Utils.IsMobile(Mobile))
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'手机号码填写错误!'}]");
                Response.End();
                return;
            }
            if (!Utils.IsPhone(Tel))
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'电话号码填写错误!'}]");
                Response.End();
                return;
            }
            EyouSoft.Model.SystemStructure.SysApplyServiceInfo model = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();
            model.ContactMobile    = Mobile;
            model.UserId           = this.SiteUserInfo.ID;
            model.CityId           = this.SiteUserInfo.CityId;
            model.ContactMQ        = this.SiteUserInfo.ContactInfo.MQ;
            model.ContactQQ        = this.SiteUserInfo.ContactInfo.QQ;
            model.CompanyId        = this.SiteUserInfo.CompanyID;
            model.CompanyName      = this.SiteUserInfo.CompanyName;
            model.ProvinceId       = this.SiteUserInfo.ProvinceId;
            model.ContactName      = ContactName;
            model.ContactTel       = Tel;
            model.ApplyText        = string.Empty;
            model.ContactAddress   = Address;
            model.ApplyTime        = DateTime.Now;
            model.CityName         = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(this.SiteUserInfo.CityId).CityName;
            model.ProvinceName     = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(this.SiteUserInfo.ProvinceId).ProvinceName;
            model.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop;

            if (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().Apply(model))
            {
                Response.Clear();
                Response.Write("[{isSuccess:true,ErrorMessage:'高级网店申请资料发送成功,请等待进一步审核!'}]");
                Response.End();
            }
            else
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'申请失败,请重新申请!'}]");
                Response.End();
            }
            model = null;
        }
コード例 #2
0
        /// <summary>
        /// 高级服务申请
        /// </summary>
        /// <param name="info">高级服务申请信息业务实体</param>
        /// <returns></returns>
        public virtual bool Apply(EyouSoft.Model.SystemStructure.SysApplyServiceInfo info)
        {
            DbCommand cmd = this.SystemStore.GetSqlStringCommand(SQL_INSERT_Apply);

            this.SystemStore.AddInParameter(cmd, "ID", DbType.String, info.ApplyId);
            this.SystemStore.AddInParameter(cmd, "ServiceType", DbType.Byte, info.ApplyServiceType);
            this.SystemStore.AddInParameter(cmd, "CompanyID", DbType.String, info.CompanyId);
            this.SystemStore.AddInParameter(cmd, "CompanyName", DbType.String, info.CompanyName);
            this.SystemStore.AddInParameter(cmd, "ProvinceId", DbType.Int32, info.ProvinceId);
            this.SystemStore.AddInParameter(cmd, "CityId", DbType.Int32, info.CityId);
            this.SystemStore.AddInParameter(cmd, "ProvinceName", DbType.String, info.ProvinceName);
            this.SystemStore.AddInParameter(cmd, "CityName", DbType.String, info.CityName);
            this.SystemStore.AddInParameter(cmd, "CompanyAdress", DbType.String, info.ContactAddress);
            this.SystemStore.AddInParameter(cmd, "UserID", DbType.String, info.UserId);
            this.SystemStore.AddInParameter(cmd, "ContactName", DbType.String, info.ContactName);
            this.SystemStore.AddInParameter(cmd, "ContactTel", DbType.String, info.ContactTel);
            this.SystemStore.AddInParameter(cmd, "ContactMobile", DbType.String, info.ContactMobile);
            this.SystemStore.AddInParameter(cmd, "ContactMQ", DbType.String, info.ContactMQ);
            this.SystemStore.AddInParameter(cmd, "ContactQQ", DbType.String, info.ContactQQ);
            this.SystemStore.AddInParameter(cmd, "ApplyText", DbType.String, info.ApplyText);
            this.SystemStore.AddInParameter(cmd, "ApplyTime", DbType.String, info.ApplyTime);
            //this.SystemStore.AddInParameter(cmd, "ApplyState", DbType.Byte, info.ApplyState);

            return(DbHelper.ExecuteSql(cmd, this.SystemStore) == 1 ? true : false);
        }
コード例 #3
0
        /// <summary>
        /// 收费MQ审核
        /// </summary>
        /// <param name="info">收费MQ申请审核信息业务实体</param>
        /// <returns>1:成功 0:失败 2:有效期限时间值不对</returns>
        public int MQChecked(EyouSoft.Model.SystemStructure.MQCheckInfo info)
        {
            if (string.IsNullOrEmpty(info.ApplyId) ||
                info.ApplyState == EyouSoft.Model.SystemStructure.ApplyServiceState.未审核)
            {
                return(0);
            }

            info.ExpireTime = info.ExpireTime.AddDays(1).AddSeconds(-1);

            if (info.EnableTime > info.ExpireTime ||
                info.EnableTime == DateTime.MinValue ||
                info.ExpireTime == DateTime.MinValue)
            {
                return(2);
            }

            EyouSoft.Model.SystemStructure.SysApplyServiceInfo apply = GetApplyInfo(info.ApplyId);
            if (apply != null)
            {
                EyouSoft.Cache.Facade.EyouSoftCache.Remove(EyouSoft.CacheTag.Company.CompanyState + apply.CompanyId);
            }

            return(dal.MQChecked(info));
        }
コード例 #4
0
        /// <summary>
        /// 高级服务申请
        /// </summary>
        /// <param name="info">高级服务申请信息业务实体</param>
        /// <returns></returns>
        public bool Apply(EyouSoft.Model.SystemStructure.SysApplyServiceInfo info)
        {
            if (!string.IsNullOrEmpty(info.CompanyId) && !this.IsApply(info.CompanyId, info.ApplyServiceType))
            {
                info.ApplyId   = Guid.NewGuid().ToString();
                info.ApplyTime = DateTime.Now;
                return(dal.Apply(info));
            }

            return(false);
        }
コード例 #5
0
        //申请开通高级网店
        protected void AddEShop()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                return;
            }
            int    result      = 0;
            string ContactName = Utils.InputText(Server.HtmlDecode(Request.QueryString["p"]));
            string Tel         = Utils.InputText(Server.HtmlDecode(Request.QueryString["t"]));
            string Mobile      = Utils.InputText(Server.HtmlDecode(Request.QueryString["m"]));
            string Net         = Utils.InputText(Request.QueryString["n"]);
            string CompanyName = Utils.InputText(Server.HtmlDecode(Request.QueryString["c"]));

            if (ContactName.Length > 0 && Tel.Length > 0 && Mobile.Length > 0 && Net.Length > 0 && CompanyName.Length > 0)
            {
                if (Utils.IsMobile(Mobile) && Utils.IsPhone(Tel) && StringValidate.IsUrl(Net) && CompanyName == this.SiteUserInfo.CompanyName)
                {
                    EyouSoft.Model.SystemStructure.SysApplyServiceInfo model = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();
                    model.ContactMobile    = Mobile;
                    model.ContactMQ        = this.SiteUserInfo.ContactInfo.MQ;
                    model.ContactName      = ContactName;
                    model.ContactQQ        = this.SiteUserInfo.ContactInfo.QQ;
                    model.ContactTel       = Tel;
                    model.ApplyTime        = DateTime.Now;
                    model.UserId           = this.SiteUserInfo.ID;
                    model.CityId           = this.SiteUserInfo.CityId;
                    model.CityName         = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(this.SiteUserInfo.CityId).CityName;
                    model.CompanyId        = this.SiteUserInfo.CompanyID;
                    model.CompanyName      = this.SiteUserInfo.CompanyName;
                    model.ProvinceId       = this.SiteUserInfo.ProvinceId;
                    model.ProvinceName     = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(this.SiteUserInfo.ProvinceId).ProvinceName;
                    model.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop;
                    model.ApplyText        = Net;
                    if (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().Apply(model))
                    {
                        result = 1;
                    }
                    model = null;
                }
                else
                {
                    result = 4;  //数据输入错误
                }
            }
            else
            {
                result = 3;     //数据填写不完整
            }
            Response.Write(result.ToString());
            Response.End();
            return;
        }
コード例 #6
0
        protected void Apply_MQ()
        {
            if (!IsCompanyCheck)
            {
                Utils.ResponseMeg(false, "对不起,你尚未审核通过!");
                return;
            }
            string companyId    = SiteUserInfo.CompanyID;
            string applyContact = Utils.GetFormValue("contact");
            string tel          = Utils.GetFormValue("tel");
            string mobile       = Utils.GetFormValue("mobile");
            string address      = Utils.GetFormValue("address");

            EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();
            serviceInfo.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.MQ;
            serviceInfo.ApplyTime        = DateTime.Now;
            serviceInfo.CityId           = SiteUserInfo.CityId;
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(SiteUserInfo.CityId);
            if (cityModel != null)
            {
                serviceInfo.CityName = cityModel.CityName;
            }
            serviceInfo.CompanyId      = SiteUserInfo.CompanyID;
            serviceInfo.CompanyName    = SiteUserInfo.CompanyName;
            serviceInfo.ContactAddress = address;
            serviceInfo.ContactMobile  = mobile;
            serviceInfo.ContactMQ      = SiteUserInfo.ContactInfo.MQ;
            serviceInfo.ContactName    = applyContact;
            serviceInfo.ContactQQ      = SiteUserInfo.ContactInfo.QQ;
            serviceInfo.ContactTel     = tel;
            serviceInfo.UserId         = SiteUserInfo.ID;
            EyouSoft.Model.SystemStructure.SysProvince provinceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(SiteUserInfo.ProvinceId);
            if (provinceModel != null)
            {
                serviceInfo.ProvinceName = provinceModel.ProvinceName;
            }
            serviceInfo.ProvinceId = SiteUserInfo.ProvinceId;
            if (!applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ))
            {
                if (applyBll.Apply(serviceInfo))
                {
                    Utils.ResponseMegSuccess();
                }
                else
                {
                    Utils.ResponseMeg(false, "申请失败!");
                }
            }
            else
            {
                Utils.ResponseMeg(false, "你已经提交过申请!");
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(TravelPermission.系统设置_权限管理))
            {
                Utils.ResponseNoPermit();
                return;
            }
            applyBll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance();
            string isCustomer = Utils.GetQueryStringValue("iscustomer");

            if (isCustomer == "yes")
            {
                sznb1.Visible = false;
            }
            companyName = SiteUserInfo.CompanyName;
            string method = Utils.GetFormValue("method");

            if (method == "applyMQ")
            {
                Apply_MQ();
                return;
            }
            if (applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ))
            {
                EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetApplyInfo(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ);
                if (serviceInfo != null)
                {
                    am_txtAddress.Visible = false;
                    am_txtContact.Visible = false;
                    am_txtMoible.Visible  = false;
                    am_txtTel.Visible     = false;
                    contantName           = "<span>" + serviceInfo.ContactName + "</span>";
                    moible     = "<span>" + serviceInfo.ContactMobile + "</span>";
                    tel        = "<span>" + serviceInfo.ContactTel + "</span>";
                    adress     = "<span>" + serviceInfo.ContactAddress + "</span>";
                    mq_message = "你已经申请开通MQ会员,目前处于审核当中……";
                }

                isApply = "style='display:none'";
            }
            else
            {
                am_txtContact.Value = SiteUserInfo.ContactInfo.ContactName;
                am_txtMoible.Value  = SiteUserInfo.ContactInfo.Mobile;
                am_txtTel.Value     = SiteUserInfo.ContactInfo.Tel;
                EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
                if (companyModel != null)
                {
                    am_txtAddress.Value = companyModel.CompanyAddress;
                }
            }
        }
コード例 #8
0
        /// <summary>
        ///
        /// </summary>
        private void ApplyServiceTest()
        {
            int recordCount = 0;

            EyouSoft.Model.SystemStructure.SysApplyServiceInfo info = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();

            info.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop;
            info.ApplyText        = "www.g.com";
            info.ApplyTime        = DateTime.Now;
            info.CityId           = 1;
            info.CityName         = "aq";
            info.CompanyId        = "bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4";
            info.CompanyName      = "company name";
            info.ContactAddress   = "company address";
            info.ContactMobile    = "15888888888";
            info.ContactMQ        = "10000";
            info.ContactName      = "contact name";
            info.ContactQQ        = "10000";
            info.ContactTel       = "057188888888";
            info.ProvinceId       = 1;
            info.ProvinceName     = "ah";
            info.UserId           = "916b9d06-72e7-410c-8cd9-a8859d04c85e";

            EyouSoft.IBLL.SystemStructure.ISysApplyService bll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance();

            bll.Apply(info);

            bll.GetApplyInfo("d63d71cb-f1c4-4317-b944-9bf8884aa41f");

            Response.Write(bll.GetApplys(10, 1, ref recordCount, EyouSoft.Model.CompanyStructure.SysService.HighShop, null, null, null, null, null, null).Count);

            Response.Write(bll.GetApplyState("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop));

            Response.Write(bll.IsApply("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop));


            EyouSoft.Model.SystemStructure.EshopCheckInfo checkinfo = new EyouSoft.Model.SystemStructure.EshopCheckInfo();
            checkinfo.ApplyId    = "d63d71cb-f1c4-4317-b944-9bf8884aa41f";
            checkinfo.ApplyState = EyouSoft.Model.SystemStructure.ApplyServiceState.审核通过;
            checkinfo.CheckTime  = DateTime.Now;
            checkinfo.DomainName = "www.google.com";
            checkinfo.EnableTime = Convert.ToDateTime("2010-01-01");
            checkinfo.ExpireTime = Convert.ToDateTime("2010-01-31");
            checkinfo.OperatorId = 1;

            Response.Write(bll.EshopChecked(checkinfo));

            /*Response.Write(bll.Renewed("d63d71cb-f1c4-4317-b944-9bf8884aa41f", Convert.ToDateTime("2010-02-01")
             *  , Convert.ToDateTime("2010-08-28"), 1, DateTime.Now));*/
        }
コード例 #9
0
        /// <summary>
        /// 处理实体信息
        /// </summary>
        /// <param name="dc"></param>
        /// <returns></returns>
        private EyouSoft.Model.SystemStructure.SysApplyServiceInfo GetApplyInfo(DbCommand dc)
        {
            EyouSoft.Model.SystemStructure.SysApplyServiceInfo info = null;

            using (IDataReader rdr = DbHelper.ExecuteReader(dc, this.SystemStore))
            {
                if (rdr.Read())
                {
                    info = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();

                    info.ApplyId          = rdr.GetString(rdr.GetOrdinal("Id"));
                    info.ApplyServiceType = (EyouSoft.Model.CompanyStructure.SysService)rdr.GetByte(rdr.GetOrdinal("ServiceType"));
                    info.ApplyState       = (EyouSoft.Model.SystemStructure.ApplyServiceState)rdr.GetByte(rdr.GetOrdinal("ApplyState"));
                    info.ApplyText        = rdr["ApplyText"].ToString();
                    info.ApplyTime        = rdr.GetDateTime(rdr.GetOrdinal("ApplyTime"));
                    info.CheckText        = rdr["CheckText"].ToString();
                    if (!rdr.IsDBNull(rdr.GetOrdinal("CheckTime")))
                    {
                        info.CheckTime = rdr.GetDateTime(rdr.GetOrdinal("CheckTime"));
                    }
                    info.CityId         = rdr.GetInt32(rdr.GetOrdinal("CityId"));
                    info.CityName       = rdr["CityName"].ToString();
                    info.CompanyId      = rdr.GetString(rdr.GetOrdinal("CompanyId"));
                    info.CompanyName    = rdr["CompanyName"].ToString();
                    info.ContactAddress = rdr["CompanyAdress"].ToString();
                    info.ContactMobile  = rdr["ContactMobile"].ToString();
                    info.ContactMQ      = rdr["ContactMQ"].ToString();
                    info.ContactName    = rdr["ContactName"].ToString();
                    info.ContactQQ      = rdr["ContactQQ"].ToString();
                    info.ContactTel     = rdr["ContactTel"].ToString();
                    if (!rdr.IsDBNull(rdr.GetOrdinal("EnableTime")))
                    {
                        info.EnableTime = rdr.GetDateTime(rdr.GetOrdinal("EnableTime"));
                    }
                    if (!rdr.IsDBNull(rdr.GetOrdinal("ExpireTime")))
                    {
                        info.ExpireTime = rdr.GetDateTime(rdr.GetOrdinal("ExpireTime"));
                    }
                    info.OperatorId   = rdr.GetInt32(rdr.GetOrdinal("OperatorID"));
                    info.ProvinceId   = rdr.GetInt32(rdr.GetOrdinal("ProvinceId"));
                    info.ProvinceName = rdr["ProvinceName"].ToString();
                    info.UserId       = rdr.GetString(rdr.GetOrdinal("UserID"));
                }
            }

            return(info);
        }
コード例 #10
0
 private void InitPage()
 {
     if (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().IsApply(this.SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.HighShop))
     {
         IsApply = true;
         EyouSoft.Model.SystemStructure.SysApplyServiceInfo applinfo = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetApplyInfo(this.SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.HighShop);
         ContactName = applinfo.ContactName;
         Mobile      = applinfo.ContactMobile;
         Tel         = applinfo.ContactTel;
         CompanyName = applinfo.CompanyName;
         Address     = applinfo.ContactAddress;
         applinfo    = null;
     }
     else
     {
         CompanyName = this.SiteUserInfo.CompanyName;
         ContactName = this.SiteUserInfo.ContactInfo.ContactName;
         Mobile      = this.SiteUserInfo.ContactInfo.Mobile;
         Tel         = this.SiteUserInfo.ContactInfo.Tel;
     }
 }
コード例 #11
0
 //获取公司信息
 private void InitCompanyInfo()
 {
     //判断是否已提交过申请
     if (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().IsApply(this.SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.HighShop))
     {
         EyouSoft.Model.SystemStructure.SysApplyServiceInfo applinfo = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetApplyInfo(this.SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.HighShop);
         if (applinfo != null)
         {
             appleshop_appleperson.Value    = applinfo.ContactName;
             appleshop_companyName.Value    = applinfo.CompanyName;
             appleshop_mod.Value            = applinfo.ContactMobile;
             appleshop_tel.Value            = applinfo.ContactTel;
             appleshop_address.Value        = applinfo.ApplyText;
             appleshop_address.Disabled     = true;
             appleshop_appleperson.Disabled = true;
             appleshop_mod.Disabled         = true;
             appleshop_tel.Disabled         = true;
             appleshop_companyName.Disabled = true;
             btnaddEshop.Disabled           = true;
             btnaddEshop.Visible            = false;
             divApplSuss.Visible            = true;
         }
     }
     else
     {
         EyouSoft.Model.CompanyStructure.CompanyDetailInfo compDetail = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this.SiteUserInfo.CompanyID); //公司详细信息
         if (compDetail != null)
         {
             appleshop_appleperson.Value = compDetail.ContactInfo.ContactName;
             appleshop_companyName.Value = compDetail.CompanyName;
             appleshop_mod.Value         = compDetail.ContactInfo.Mobile;
             appleshop_tel.Value         = compDetail.ContactInfo.Tel;
         }
         compDetail = null;
     }
 }
コード例 #12
0
        /// <summary>
        /// 获取快到期服务信息集合
        /// </summary>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="pageIndex">当前页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="serviceType">高级服务项目</param>
        /// <param name="expireStartTime">到期起始时间 为null时不做为查询条件</param>
        /// <param name="expireFinishTime">到期截止时间 为null时不做为查询条件</param>
        /// <param name="userAreas">用户分管的区域范围 为null时不做为查询条件</param>
        /// <param name="provinceId">省份编号 为null时不做为查询条件</param>
        /// <param name="cityId">城市编号 为null时不做为查询条件</param>
        /// <param name="companyName">公司名称 为null时不做为查询条件</param>
        /// <param name="searchStartTime">搜索起始时间 为null时不做为查询条件</param>
        /// <param name="searchFinishTime">搜索截止时间 为null时不做为查询条件</param>
        /// <returns></returns>
        public virtual IList <EyouSoft.Model.SystemStructure.SysApplyServiceInfo> GetComingExpireApplys(int pageSize, int pageIndex, ref int recordCount
                                                                                                        , EyouSoft.Model.CompanyStructure.SysService serviceType, DateTime?expireStartTime, DateTime?expireFinishTime
                                                                                                        , string userAreas
                                                                                                        , int?provinceId, int?cityId, string companyName
                                                                                                        , DateTime?searchStartTime, DateTime?searchFinishTime)
        {
            IList <EyouSoft.Model.SystemStructure.SysApplyServiceInfo> services = new List <EyouSoft.Model.SystemStructure.SysApplyServiceInfo>();

            StringBuilder cmdQuery      = new StringBuilder();
            string        tableName     = "tbl_SysApplyService";
            string        primaryKey    = "Id";
            string        orderByString = "ApplyState ASC,CheckTime DESC,ApplyTime DESC";
            string        fields        = "*";

            #region 拼接查询条件
            cmdQuery.AppendFormat(" ApplyState=1 AND ServiceType={0} ", (int)serviceType);

            if (expireStartTime.HasValue)
            {
                cmdQuery.AppendFormat(" AND ExpireTime>='{0}' ", expireStartTime.Value);
            }

            if (expireFinishTime.HasValue)
            {
                cmdQuery.AppendFormat(" AND ExpireTime<='{0}' ", expireFinishTime.Value);
            }

            if (!string.IsNullOrEmpty(userAreas))
            {
                cmdQuery.AppendFormat(" AND CityId IN({0}) ", userAreas);
            }

            if (provinceId.HasValue)
            {
                cmdQuery.AppendFormat(" AND ProvinceId={0} ", provinceId.Value);
            }

            if (cityId.HasValue)
            {
                cmdQuery.AppendFormat(" AND CityId={0} ", cityId.Value);
            }

            if (!string.IsNullOrEmpty(companyName))
            {
                cmdQuery.AppendFormat(" AND CompanyName LIKE '%{0}%' ", companyName);
            }

            if (searchStartTime.HasValue)
            {
                cmdQuery.AppendFormat(" AND ExpireTime>='{0}' ", searchStartTime.Value);
            }

            if (searchFinishTime.HasValue)
            {
                cmdQuery.AppendFormat(" AND ExpireTime<='{0}' ", searchFinishTime.Value);
            }
            #endregion

            using (IDataReader rdr = DbHelper.ExecuteReader(this.SystemStore, pageSize, pageIndex, ref recordCount, tableName, primaryKey, fields, cmdQuery.ToString(), orderByString))
            {
                while (rdr.Read())
                {
                    EyouSoft.Model.SystemStructure.SysApplyServiceInfo info = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();

                    info.ApplyId          = rdr.GetString(rdr.GetOrdinal("Id"));
                    info.ApplyServiceType = (EyouSoft.Model.CompanyStructure.SysService)rdr.GetByte(rdr.GetOrdinal("ServiceType"));
                    info.ApplyState       = (EyouSoft.Model.SystemStructure.ApplyServiceState)rdr.GetByte(rdr.GetOrdinal("ApplyState"));
                    info.ApplyText        = rdr["ApplyText"].ToString();
                    info.ApplyTime        = rdr.GetDateTime(rdr.GetOrdinal("ApplyTime"));
                    info.CheckText        = rdr["CheckText"].ToString();
                    if (!rdr.IsDBNull(rdr.GetOrdinal("CheckTime")))
                    {
                        info.CheckTime = rdr.GetDateTime(rdr.GetOrdinal("CheckTime"));
                    }
                    info.CityId         = rdr.GetInt32(rdr.GetOrdinal("CityId"));
                    info.CityName       = rdr["CityName"].ToString();
                    info.CompanyId      = rdr.GetString(rdr.GetOrdinal("CompanyId"));
                    info.CompanyName    = rdr["CompanyName"].ToString();
                    info.ContactAddress = rdr["CompanyAdress"].ToString();
                    info.ContactMobile  = rdr["ContactMobile"].ToString();
                    info.ContactMQ      = rdr["ContactMQ"].ToString();
                    info.ContactName    = rdr["ContactName"].ToString();
                    info.ContactQQ      = rdr["ContactQQ"].ToString();
                    info.ContactTel     = rdr["ContactTel"].ToString();
                    if (!rdr.IsDBNull(rdr.GetOrdinal("EnableTime")))
                    {
                        info.EnableTime = rdr.GetDateTime(rdr.GetOrdinal("EnableTime"));
                    }
                    if (!rdr.IsDBNull(rdr.GetOrdinal("ExpireTime")))
                    {
                        info.ExpireTime = rdr.GetDateTime(rdr.GetOrdinal("ExpireTime"));
                    }
                    info.OperatorId   = rdr.GetInt32(rdr.GetOrdinal("OperatorID"));
                    info.ProvinceId   = rdr.GetInt32(rdr.GetOrdinal("ProvinceId"));
                    info.ProvinceName = rdr["ProvinceName"].ToString();
                    info.UserId       = rdr.GetString(rdr.GetOrdinal("UserID"));

                    services.Add(info);
                }
            }

            return(services);
        }