123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace LYFZ.WeixinServers.WeiXinAPP
- {
- public partial class CustomerCacheList : System.Web.UI.Page
- {
- LYFZ.WeixinServiceDate.DAL.DAL_CustomerInterfaces cusDal = new WeixinServiceDate.DAL.DAL_CustomerInterfaces();
- protected void Page_Load(object sender, EventArgs e)
- {
- CommonHandler.CheckLoginJump(this);
- if (!IsPostBack)
- {
- if (Request.QueryString["Keyword"] != null)
- {
- Keyword = Request.QueryString["Keyword"].ToString().Trim();
- }
- if (Request.QueryString["type"] != null)
- {
- if (Request.QueryString["type"].ToString().Trim() == "refresh") {
- Global.RefreshLoadCustDaTable();
- }
- }
- bindCustomerList();
-
- }
- }
- string Keyword = "";
- public string PagingInfoHtml = "";
- public System.Text.StringBuilder CustomerListHtmlTb = new System.Text.StringBuilder();
- void bindCustomerList()
- {
- try
- {
- string whereStr = "";
- if (Keyword.Length > 0)
- {
- whereStr = " [JMGDomainName] like '%" + Keyword + "%' or [ShellDomainName] like '%" + Keyword + "%' or [IPAddress] like '%" + Keyword + "%' or [CompanyName] like '%" + Keyword + "%' ";
- }
- DataRow[] cacheRows = Global.CustDaTable.Select(whereStr.Trim(), "id desc");
- int sumCount = cacheRows.Length;
- string countInfo = "当前缓存共" + sumCount.ToString() + "条记录";
- PagingInfoHtml = LYFZ.WXLibrary.PageTabList.GetPagingInfo_Web(1, 1, countInfo);
- for (int i = 0; i < cacheRows.Length; i++)
- {
- DataRow row = cacheRows[i];
- string ISEnabled = "禁用";
- string iconName = "lock";
- if (row["ISEnabled"].ToString() == "1")
- {
- ISEnabled = "启用";
- iconName = "ok";
- }
-
- string thisUrl = row["ShellDomainName"].ToString();
- CustomerListHtmlTb.Append("<tr>"
- + " <td>" + (i + 1).ToString() + "</td>"
- + " <td>" + row["CompanyName"].ToString() + "</td>"
- + " <td>" + row["JMGDomainName"].ToString() + "</td>"
- + " <td>" + row["ShellDomainName"].ToString() + "</td>"
- + " <td>" + row["AppSecret"].ToString() + "</td>"
- + " <td>" + row["CallFrequency"].ToString() + "</td>"
- + "<td>" + Convert.ToDateTime(row["RefreshTime"]).ToString("yyyy-MM-dd HH:mm") + "</td>"
- + "<td>" + Convert.ToDateTime(row["CreateTime"]).ToString("yyyy-MM-dd HH:mm") + "</td>"
- + " <td>" + ISEnabled + "</td>"
- + " <td>"
- + "<a target=\"_blank\" href=\"" + thisUrl + "/WebMobile/Login.aspx\" style=\"margin-right:10px;\"><i class=\"icon-home\"></i></a>"
- + "<a style=\"margin-right:10px;\"><i class=\"icon-" + iconName + "\"></i></a>"
- + "</td>"
- + " </tr>");
- }
- }
- catch
- {
- Global.RefreshLoadCustDaTable();
- }
- }
- }
- }
|