Ejemplo n.º 1
0
        /// <summary>
        /// 初始化充值明细集合
        /// </summary>
        void InitCharges()
        {
            PageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;

            var searchInfo = new EyouSoft.Model.SmsStructure.MSmsBankChargeSearchInfo();
            var items      = new EyouSoft.BLL.SmsStructure.BSmsAccount().GetSmsBankCharges(PageSize, PageIndex, out recordCount, searchInfo);

            if (items != null && items.Count > 0)
            {
                this.rptCharges.DataSource = items;
                this.rptCharges.DataBind();
                this.phNotFound.Visible = false;

                RegisterScript(string.Format("pConfig.pageSize={0};pConfig.pageIndex={1};pConfig.recordCount={2};", PageSize, PageIndex, recordCount));
            }
            else
            {
                this.phNotFound.Visible = true;
            }
        }
Ejemplo n.º 2
0
        private void PageInit()
        {
            var chaXun  = new EyouSoft.Model.SmsStructure.MSmsBankChargeSearchInfo();
            var setting = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(SiteUserInfo.CompanyId);

            chaXun.AccountId = setting.SmsConfig.Account;
            chaXun.AppKey    = setting.SmsConfig.AppKey;
            chaXun.AppSecret = setting.SmsConfig.AppSecret;

            var list = new EyouSoft.BLL.SmsStructure.BSmsAccount().GetSmsBankCharges(PageSize, PageIndex, out RecordCount, chaXun);

            litBalance.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(new EyouSoft.BLL.SmsStructure.BSmsAccount().GetSmsAccountYuE(CurrentUserCompanyID), ProviderToMoney);
            if (list != null && list.Count > 0)
            {
                repList.DataSource = list;
                repList.DataBind();
            }
            else
            {
                repList.EmptyText = "<tr><td colspan=\"4\">暂无相关冲值记录!</td></tr>";
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取短信充值明细集合
        /// </summary>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="searchInfo">查询信息</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.SmsStructure.MSmsBankChargeInfo> GetSmsBankCharges(int pageSize, int pageIndex, out int recordCount, EyouSoft.Model.SmsStructure.MSmsBankChargeSearchInfo searchInfo)
        {
            recordCount = 0;
            IList <EyouSoft.Model.SmsStructure.MSmsBankChargeInfo> items = new List <EyouSoft.Model.SmsStructure.MSmsBankChargeInfo>();
            var api           = GetSmsCenterApi();
            var apiSearchInfo = new EyouSoft.BLL.SmsCenter.MQuerySmsBankCharge();

            if (searchInfo != null)
            {
                apiSearchInfo.AccountId     = searchInfo.AccountId;
                apiSearchInfo.AppKey        = searchInfo.AppKey;
                apiSearchInfo.AppSecret     = searchInfo.AppSecret;
                apiSearchInfo.ChargeComName = searchInfo.ChargeComName;
                apiSearchInfo.ChargeName    = searchInfo.ChargeName;
                apiSearchInfo.EndTime       = searchInfo.EndTime;
                apiSearchInfo.StartTime     = searchInfo.StartTime;
                apiSearchInfo.Status        = (EyouSoft.BLL.SmsCenter.ChargeStatus?)searchInfo.Status;
            }

            var apiRetItems = api.GetSmsBankCharge(pageSize, pageIndex, ref recordCount, apiSearchInfo);

            if (apiRetItems != null && apiRetItems.Length > 0)
            {
                foreach (var item in apiRetItems)
                {
                    var tmp = new EyouSoft.Model.SmsStructure.MSmsBankChargeInfo();
                    tmp.AccountId       = item.AccountId;
                    tmp.AppKey          = item.AppKey;
                    tmp.AppSecret       = item.AppSecret;
                    tmp.ChargeAmount    = item.ChargeAmount;
                    tmp.ChargeComName   = item.ChargeComName;
                    tmp.ChargeId        = item.ChargeId;
                    tmp.ChargeName      = item.ChargeName;
                    tmp.ChargeTelephone = item.ChargeTelephone;
                    tmp.IssueTime       = item.IssueTime;
                    tmp.RealAmount      = item.RealAmount;
                    tmp.Status          = (int)item.Status;
                    tmp.SysTypeName     = item.SysType.ToString();
                    tmp.ShenHeBeiZhu    = item.ShenHeBeiZhu;
                    tmp.ShenHeRen       = item.ShenHeRen;
                    tmp.ShenHeShiJian   = item.ShenHeShiJian;

                    items.Add(tmp);
                }
            }

            return(items);
        }