private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); int _loginID = -2; _loginID = userID; query.LoginID = userID; if (!string.IsNullOrEmpty(RequestCustID)) { if (RequestCustID.ToUpper().StartsWith("CB")) { query.CBID = RequestCustID; } else { query.CRMCustID = RequestCustID; } } query.LoginID = BitAuto.ISDC.CC2012.Entities.Constants.Constant.INT_INVALID_VALUE;//add by wangtonghai DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistory(query, "a.CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); if (dt != null) { repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); } litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, PageSize, BLL.PageCommon.Instance.PageIndex, 40); }
private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); int _loginID = -2; _loginID = userID; query.LoginID = userID; if (!string.IsNullOrEmpty(BeginTime) && !string.IsNullOrEmpty(EndTime)) { DateTime _begin; DateTime _end; if (DateTime.TryParse(BeginTime + " 00:00:00", out _begin)) { query.CreateTimeBegin = _begin; } if (DateTime.TryParse(EndTime + " 23:59:59", out _end)) { query.CreateTimeEnd = _end; } } if (!string.IsNullOrEmpty(AgentGroup) && AgentGroup != "-2") { int _bgid; if (int.TryParse(AgentGroup, out _bgid)) { query.BGID = _bgid; } } if (!string.IsNullOrEmpty(HandNum)) { query.Phone = HandNum; } if (!string.IsNullOrEmpty(Reservicer)) { query.Reservicer = Reservicer; } if (!string.IsNullOrEmpty(SendContent)) { query.Content = SendContent; } if (RequestAgentUserID != -2) { query.CreateUserID = RequestAgentUserID; } if (!string.IsNullOrEmpty(SMSStatus) && SMSStatus != "-2") { int _smsstatus; if (int.TryParse(SMSStatus, out _smsstatus)) { query.Status = _smsstatus; } } DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistoryForExport(query, "a.CreateTime DESC", 1, -1, out RecordCount); ExportData(dt); }
private void BindData() { PageSize = 50; if (PhoneNums != "") { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); query.PhoneList = PhoneNums; DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistory(query, "a.CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); } else { repeaterTableList.DataSource = null; repeaterTableList.DataBind(); } }
private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); query.CRMCustID = CRMCustID; query.CBID = CBID; query.LoginID = null; DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistory(query, "a.CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); if (dt != null) { repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); } //分页控件 AjaxPager_SMSRecord.PageSize = 10; AjaxPager_SMSRecord.InitPager(RecordCount); }
private void BindData() { PageSize = 10; litPagerDown.Visible = true; if (PhoneNums != "") { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); query.PhoneList = PhoneNums; DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistory(query, "a.CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); //分页控件 litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, PageSize, BLL.PageCommon.Instance.PageIndex, 1014); } else { repeaterTableList.DataSource = null; repeaterTableList.DataBind(); litPagerDown.Text = ""; } }
private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); int _loginID = -2; _loginID = userID; query.LoginID = userID; if (!string.IsNullOrEmpty(BeginTime) && !string.IsNullOrEmpty(EndTime)) { DateTime _begin; DateTime _end; if (DateTime.TryParse(BeginTime + " 00:00:00", out _begin)) { query.CreateTimeBegin = _begin; } if (DateTime.TryParse(EndTime + " 23:59:59", out _end)) { query.CreateTimeEnd = _end; } } if (!string.IsNullOrEmpty(AgentGroup) && AgentGroup != "-2") { int _bgid; if (int.TryParse(AgentGroup, out _bgid)) { query.BGID = _bgid; } } if (!string.IsNullOrEmpty(AgentNum)) { query.AgentNum = AgentNum; } if (RequestAgentUserID != -2) { query.CreateUserID = RequestAgentUserID; } DataTable dt = BLL.SMSSendHistory.Instance.GetSMSHistroyStatistics(query, "", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); if (dt != null) { int Recordcountz = 0; DataTable dtZ = BLL.SMSSendHistory.Instance.GetSMSHistroyStatistics(query, "", 1, 1000000, out Recordcountz); int sendZ = 0; int sendSuccess = 0; int sendFail = 0; if (dtZ != null && dtZ.Rows.Count > 0) { for (int i = 0; i < dtZ.Rows.Count; i++) { int _sendz = 0; if (int.TryParse(dtZ.Rows[i]["znum"].ToString(), out _sendz)) { sendZ += _sendz; } int _sendsuccess = 0; if (int.TryParse(dtZ.Rows[i]["successnum"].ToString(), out _sendsuccess)) { sendSuccess += _sendsuccess; } int _sendfail = 0; if (int.TryParse(dtZ.Rows[i]["failnum"].ToString(), out _sendfail)) { sendFail += _sendfail; } } } DataRow row = dt.NewRow(); row["truename"] = "汇总"; row["agentnum"] = "--"; row["znum"] = sendZ; row["successnum"] = sendSuccess; row["failnum"] = sendFail; dt.Rows.Add(row); repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); } litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, PageSize, BLL.PageCommon.Instance.PageIndex, 1); }
private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); int _loginID = -2; _loginID = userID; query.LoginID = userID; if (!string.IsNullOrEmpty(BeginTime) && !string.IsNullOrEmpty(EndTime)) { DateTime _begin; DateTime _end; if (DateTime.TryParse(BeginTime + " 00:00:00", out _begin)) { query.CreateTimeBegin = _begin; } if (DateTime.TryParse(EndTime + " 23:59:59", out _end)) { query.CreateTimeEnd = _end; } } if (!string.IsNullOrEmpty(AgentGroup) && AgentGroup != "-2") { int _bgid; if (int.TryParse(AgentGroup, out _bgid)) { query.BGID = _bgid; } } if (!string.IsNullOrEmpty(AgentNum)) { query.AgentNum = AgentNum; } if (RequestAgentUserID != -2) { query.CreateUserID = RequestAgentUserID; } DataTable dt = BLL.SMSSendHistory.Instance.GetSMSHistroyStatistics(query, "", 1, -1, out RecordCount); if (dt != null) { dt.Columns.Add("starttime", typeof(string)); dt.Columns.Add("endtime", typeof(string)); int sendZ = 0; int sendSuccess = 0; int sendFail = 0; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["starttime"] = BeginTime; dt.Rows[i]["endtime"] = EndTime; int _sendz = 0; if (int.TryParse(dt.Rows[i]["znum"].ToString(), out _sendz)) { sendZ += _sendz; } int _sendsuccess = 0; if (int.TryParse(dt.Rows[i]["successnum"].ToString(), out _sendsuccess)) { sendSuccess += _sendsuccess; } int _sendfail = 0; if (int.TryParse(dt.Rows[i]["failnum"].ToString(), out _sendfail)) { sendFail += _sendfail; } } } DataRow row = dt.NewRow(); row["truename"] = "汇总"; row["agentnum"] = "--"; row["znum"] = sendZ; row["successnum"] = sendSuccess; row["failnum"] = sendFail; row["starttime"] = BeginTime; row["endtime"] = EndTime; dt.Rows.Add(row); } ExportData(dt); }
private void BindData() { Entities.QuerySMSSendHistory query = new Entities.QuerySMSSendHistory(); int _loginID = -2; _loginID = userID; query.LoginID = userID; if (!string.IsNullOrEmpty(BeginTime) && !string.IsNullOrEmpty(EndTime)) { DateTime _begin; DateTime _end; if (DateTime.TryParse(BeginTime + " 00:00:00", out _begin)) { query.CreateTimeBegin = _begin; } if (DateTime.TryParse(EndTime + " 23:59:59", out _end)) { query.CreateTimeEnd = _end; } } if (!string.IsNullOrEmpty(AgentGroup) && AgentGroup != "-2") { int _bgid; if (int.TryParse(AgentGroup, out _bgid)) { query.BGID = _bgid; } } if (!string.IsNullOrEmpty(HandNum)) { query.Phone = HandNum; } if (!string.IsNullOrEmpty(Reservicer)) { query.Reservicer = Reservicer; } if (!string.IsNullOrEmpty(SendContent)) { query.Content = SendContent; } if (RequestAgentUserID != -2) { query.CreateUserID = RequestAgentUserID; } if (!string.IsNullOrEmpty(SMSStatus) && SMSStatus != "-2") { int _smsstatus; if (int.TryParse(SMSStatus, out _smsstatus)) { query.Status = _smsstatus; } } DataTable dt = BLL.SMSSendHistory.Instance.GetSMSSendHistory(query, "a.CreateTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out RecordCount); if (dt != null) { repeaterTableList.DataSource = dt; repeaterTableList.DataBind(); } litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, PageSize, BLL.PageCommon.Instance.PageIndex, 1); }