protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目, true); return; } pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);//获取当前页码 itemIndex = (pageIndex - 1) * pageSize + 1; //查询关键字 string smsKeyword = Request.QueryString["smsKeyword"];//关键字 smsKeyword = !string.IsNullOrEmpty(smsKeyword) ? Utils.InputText(Server.UrlDecode(smsKeyword)) : ""; string sendStartDate = Utils.GetQueryStringValue("startdate"); //发送起始时间 string sendEndDate = Utils.GetQueryStringValue("enddate"); //发送结束时间 string sendState = Utils.GetQueryStringValue("sendstate"); //发送状态 EyouSoft.BLL.SMSStructure.SendMessage messBll = new EyouSoft.BLL.SMSStructure.SendMessage(); IList <EyouSoft.Model.SMSStructure.SendDetail> list = null; //导出Excel if (Utils.GetQueryStringValue("method") == "downexcel") { string strPageSize = Utils.GetQueryStringValue("recordcount"); pageSize = Utils.GetInt(strPageSize == "0" ? "1" : strPageSize); list = messBll.GetSendHistorys(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID.ToString(), smsKeyword, Utils.GetInt(sendState), Utils.GetDateTimeNullable(sendStartDate), Utils.GetDateTimeNullable(sendEndDate)); DownLoadExcel(list); return; } //绑定发送历史 list = messBll.GetSendHistorys(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID.ToString(), smsKeyword, Utils.GetInt(sendState), Utils.GetDateTimeNullable(sendStartDate), Utils.GetDateTimeNullable(sendEndDate)); if (list != null && list.Count > 0) { rptSendHistory.DataSource = list; rptSendHistory.DataBind(); BindExportPage(); } else { rptSendHistory.EmptyText = "<tr><td colspan='4' align='center'>对不起,暂无历史记录信息!</td></tr>"; ExportPageInfo1.Visible = false; } //恢复查询条件 txtKeyWord.Value = smsKeyword; //关键字 txtSendEndDate.Value = sendEndDate; //发送结束时间 txtSendStartDate.Value = sendStartDate; //发送起始时间 selSendState.Value = sendState; //发送状态 }
protected string detailMess = string.Empty;//发送详情html protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目, true); return; } string method = Utils.GetQueryStringValue("method"); string tid = Utils.GetQueryStringValue("tid"); EyouSoft.BLL.SMSStructure.SendMessage sendBll = new EyouSoft.BLL.SMSStructure.SendMessage(); StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("<table width='90%' cellspacing='1' cellpadding='0' border='0'>"); //获取发送详情列表1成功2失败 if (method == "1" || method == "2") { //获取发送详情 IList <EyouSoft.Model.SMSStructure.SendDetail> list = sendBll.GetSendDetails(tid, CurrentUserCompanyID.ToString(), Utils.GetInt(method)); strBuilder.Append("<tr><td class='odd'>手机号码</td><td class='odd'>发送状态</td></tr>"); if (list != null && list.Count > 0) { foreach (EyouSoft.Model.SMSStructure.SendDetail detail in list) { strBuilder.AppendFormat("<tr><td class='even'>{0}</td><td class='even'>{1}</td></tr>", detail.MobileNumber, detail.ReturnResult == 0 ? "发送成功" : "发送失败"); } } else { strBuilder.Append("<tr><td colspan='2'>无号码</tr>"); } } else if (method == "mess") { //获取发送内容 strBuilder.Append("<tr><td class='odd'>发送内容</td></tr>"); string content = sendBll.GetSendContent(tid, CurrentUserCompanyID.ToString()); strBuilder.AppendFormat("<tr><td class='even'>{0}</td></tr>", content != null ? content : "无信息"); } strBuilder.Append("</table>"); detailMess = strBuilder.ToString(); }
protected void Page_Load(object sender, EventArgs e) { pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); //获取当前页码 string smsKeyword = Utils.GetQueryStringValue("smsKeyword"); //关键字 string sendStartDate = Utils.GetQueryStringValue("startdate"); //发送岂是时间 string sendEndDate = Utils.GetQueryStringValue("enddate"); //发送结束时间 string sendState = Utils.GetQueryStringValue("sendstate"); //发送状态 EyouSoft.BLL.SMSStructure.SendMessage messBll = new EyouSoft.BLL.SMSStructure.SendMessage(); recordCount = Utils.GetInt(Utils.GetQueryStringValue("recordcount")); if (recordCount != 0) { pageSize = recordCount; } //绑定历史记录 IList <EyouSoft.Model.SMSStructure.SendDetail> list = messBll.GetSendHistorys(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID.ToString(), smsKeyword, Utils.GetInt(sendState), Utils.GetDateTimeNullable(sendStartDate), Utils.GetDateTimeNullable(sendEndDate)); if (list != null && list.Count > 0) { rptSendHistory.DataSource = list; rptSendHistory.DataBind(); } else { rptSendHistory.EmptyText = "<tr><td colspan='4' align='center'>对不起,暂无历史记录信息!</td></tr>"; } }
protected int itemIndex;//序号 protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户关怀_栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.客户关系管理_客户关怀_栏目, true); return; } pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); itemIndex = (pageIndex - 1) * pageSize + 1; //客户关怀bll EyouSoft.BLL.CompanyStructure.CustomerCareFor careBll = new EyouSoft.BLL.CompanyStructure.CustomerCareFor(); //绑定客户关怀列表 IList <EyouSoft.Model.CompanyStructure.CustomerCareforInfo> list = careBll.GetList(CurrentUserCompanyID.ToString(), pageSize, pageIndex, ref recordCount); if (list != null && list.Count > 0) { rptSmsList.DataSource = list; rptSmsList.DataBind(); BindExportPage(); } else { rptSmsList.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无短信发送信息!</td></tr>"; ExporPageInfoSelect1.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目, true); return; } EyouSoft.BLL.SMSStructure.CustomerList custBll = new EyouSoft.BLL.SMSStructure.CustomerList(); //绑定客户类别 IList <EyouSoft.Model.SMSStructure.CustomerClass> classList = custBll.GetCustomerClass(CurrentUserCompanyID); if (classList != null && classList.Count > 0) { selCustType.DataTextField = "ClassName"; selCustType.DataValueField = "ID"; selCustType.DataSource = classList; selCustType.DataBind(); } selCustType.Items.Insert(0, new ListItem("请选择", "")); string method = Utils.GetQueryStringValue("method"); pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); itemIndex = (pageIndex - 1) * pageSize + 1; //删除客户 if (method == "del") { string custid = Utils.GetQueryStringValue("custid"); bool result = custBll.DeleteCustomerList(custid.Split(',')); Utils.ResponseMeg(result, string.Empty); return; } //查询条件 string userName = Request.QueryString["username"];//客户名 userName = !string.IsNullOrEmpty(userName) ? Utils.InputText(Server.UrlDecode(userName)) : ""; string mobile = Request.QueryString["mobile"];//手机号 mobile = !string.IsNullOrEmpty(mobile) ? Utils.InputText(Server.UrlDecode(mobile)) : ""; string companyname = Request.QueryString["companyname"];//单位名称 companyname = !string.IsNullOrEmpty(companyname) ? Utils.InputText(Server.UrlDecode(companyname)) : ""; string custtype = Utils.GetQueryStringValue("custtype");//客户类别 //绑定客户列表 IList <EyouSoft.Model.SMSStructure.CustomerList> list = custBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID.ToString(), companyname, userName, mobile, Utils.GetInt(custtype)); if (list != null && list.Count > 0) { rptCustomer.DataSource = list; rptCustomer.DataBind(); BindExportPage(); } else { rptCustomer.EmptyText = "<tr><td colspan='7' align='center'>对不起,暂无客户信息!</td></tr>"; ExportPageInfo1.Visible = false; } //恢复查询条件 txtCompanyName.Value = companyname; //单位名称 txtMobile.Value = mobile; //手机号 selCustType.Value = custtype; //客户类别 txtUserName.Value = userName; //客户名 }