Exemplo n.º 1
0
        /// <summary>
        /// 查询发送记录
        /// </summary>
        /// <param name="pagin"></param>
        void InitSendData(Pagination pagination)
        {
            var query = SMSAccountService.QuerySendRecords(sendQueryCondition(), pagination);

            if (query.Any())
            {
                grv_sendRecord.DataSource = from item in query
                                            select new
                {
                    item.CompanyId,
                    Mobiles = item.Mobiles.Join("<br />"),
                    item.Content,
                    item.SendTime,
                    Status = item.Status.GetDescription(),
                    item.OperatorAccount,
                    FiadPhone = item.Status == SMS.DataTransferObject.SendStatus.PartFailed || item.Status == SMS.DataTransferObject.SendStatus.Failed ? item.FailedMobiles.Join("<br />") : ""
                };
                grv_sendRecord.DataBind();
                showempty.Visible      = false;
                send_pager.Visible     = true;
                grv_sendRecord.Visible = true;
                send_pager.RowCount    = pagination.RowCount;
            }
            else
            {
                grv_sendRecord.Visible = false;
                showempty.Visible      = true;
                send_pager.Visible     = false;
            }
        }
Exemplo n.º 2
0
        void InitDataGrid()
        {
            var query = SMSAccountService.QueryAccount(CurrentCompany.CompanyId);

            if (query != null)
            {
                if (query.Balance <= 50)
                {
                    LastDiv.Visible      = true;
                    MoreDiv.Visible      = false;
                    this.lblLastNum.Text = query.Balance.ToString();
                }
                else
                {
                    MoreDiv.Visible      = true;
                    LastDiv.Visible      = false;
                    this.lblMoreNum.Text = query.Balance.ToString();
                }
                this.lblLastNum.Text = query.Balance.ToString();
            }
            else
            {
                this.lblLastNum.Text = "0";
                LastDiv.Visible      = true;
                MoreDiv.Visible      = false;
            }
        }
Exemplo n.º 3
0
        private void initData()
        {
            var change = QSService.QueryPurchaseFlightStaticInfo(this.CurrentCompany.CompanyId);

            if (change == null || change.OrderCount == 0)
            {
                flightChangeWithoutData.Visible = true;
                flightChangeHasData.Visible     = false;
                this.emptyDataInfo.Visible      = true;
            }
            else
            {
                lblFlightChangeTime.Text = change.LastQSTime.ToString();
                lblFlightCount.Text      = change.FlightCount.ToString();
                lblOrderCount.Text       = change.OrderCount.ToString();
                queryTransferDetail(1);
            }

            if (!string.IsNullOrWhiteSpace(this.CurrentCompany.OfficePhones))
            {
                this.hfdPurchasePhone.Value = this.CurrentCompany.OfficePhones;
            }
            else
            {
                this.hfdPurchasePhone.Value = this.CurrentCompany.ContactPhone;
            }
            var query = SMSAccountService.QueryAccount(CurrentCompany.CompanyId);

            if (query != null)
            {
                this.lblMessageCount.Text = query.Balance.ToString();
            }
            else
            {
                this.lblMessageCount.Text = "0";
            }
        }