/// <summary> /// 导出 /// </summary> private void ToXls() { int RecordCount = 0; EyouSoft.Model.SmsStructure.MQuerySmsDetail model = new EyouSoft.Model.SmsStructure.MQuerySmsDetail() { StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("iptStartTime")), EndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("iptEndTime")), Status = (EyouSoft.Model.EnumType.SmsStructure.SendStatus?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.SmsStructure.SendStatus), Utils.GetQueryStringValue("ddlStatus")), KeyWord = Utils.GetQueryStringValue("iptKeyWord") }; var List = new EyouSoft.BLL.SmsStructure.BSmsDetail().GetSmsDetailList(UtilsCommons.GetToXlsRecordCount(), 1, ref RecordCount, SiteUserInfo.CompanyId, model); if (List != null && List.Count > 0) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\n", "发送时间", "号码", "发送内容", "价格", "状态"); foreach (EyouSoft.Model.SmsStructure.MSmsDetail item in List) { sb.Append(item.IssueTime + "\t"); sb.Append("'" + GetMobileStr(item.Number) + "\t"); sb.Append(item.Content + "\t"); sb.Append(UtilsCommons.GetMoneyString(item.Amount, ProviderToMoney) + "\t"); sb.Append(item.Status.ToString() + "\n"); } ResponseToXls(sb.ToString()); } ResponseToXls(string.Empty); }
private void PageInit() { EyouSoft.Model.SmsStructure.MQuerySmsDetail model = new EyouSoft.Model.SmsStructure.MQuerySmsDetail() { StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("iptStartTime")), EndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("iptEndTime")), Status = (EyouSoft.Model.EnumType.SmsStructure.SendStatus?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.SmsStructure.SendStatus), Utils.GetQueryStringValue("ddlStatus")), KeyWord = Utils.GetQueryStringValue("iptKeyWord") }; var List = new EyouSoft.BLL.SmsStructure.BSmsDetail().GetSmsDetailList(PageSize, PageIndex, ref RecordCount, SiteUserInfo.CompanyId, model); if (List == null || List.Count == 0) { this.repList.EmptyText = "<tr align=\"center\"><td colspan=\"5\">暂无历史发送记录!</td></tr>"; this.ExporPageInfoSelect1.Visible = false; } else { this.repList.DataSource = List; this.repList.DataBind(); } }