123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- 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.DZKJ
- {
- public partial class DZKJTaskExecutionStatistics : System.Web.UI.Page
- {
- string Account = "";
- string Token = "";
- DateTime ExecDate = DateTime.Now;
- protected void Page_Load(object sender, EventArgs e)
- {
- var retJosnObj = DZKJInterface.GetReturnJson(-1, "", "参数错误");
- if (Request.QueryString["Account"] != null)
- {
- Account = Request.QueryString["Account"].ToString();
- }
- if (Request.QueryString["Token"] != null)
- {
- Token = Request.QueryString["Token"].ToString();
- }
- try
- {
- if (Request.QueryString["ExecDate"] != null)
- {
- ExecDate = Convert.ToDateTime(Request.QueryString["ExecDate"].ToString());
- }
- }
- catch { }
- if (!string.IsNullOrEmpty(Account) && Global.DZKJ_CustomerAccountDataTable.Rows.Contains(Account))
- {
- DataTable tb= LYFZ.WeixinServiceDate.DAL.DAL_DZKJ_TaskExecutionStatistics.GetTaskExecutionStatistics(Account, ExecDate);
- object dataJson = new { };
- List<object> dataList = new List<object>();
- if (tb.Rows.Count > 0)
- {
- foreach (DataRow row in tb.Rows)
- {
- string Features = row["Features"].ToString();
- int ExecutionCount = Convert.ToInt32(row["ExecutionCount"].ToString());
- var data = new
- {
- Features = Features,
- ExecutionCount = ExecutionCount
- };
- dataList.Add(data);
- }
-
- }
- else
- {
- var data = new
- {
- Features = "未使用",
- ExecutionCount = 0
- };
- dataList.Add(data);
- }
- dataJson = dataList.ToArray();
- retJosnObj = DZKJInterface.GetReturnJson(0, dataJson, "成功");
- }
- string iniConfigInfo = Newtonsoft.Json.JsonConvert.SerializeObject(retJosnObj);
- Response.Write(iniConfigInfo);
- }
- }
- }
|