Пример #1
0
        public string Query()
        {
            string        title      = this.Request.Form["Title"];
            string        userID     = this.Request.Form["UserID"];
            string        type       = this.Request.Form["Type"];
            string        date1      = this.Request.Form["Date1"];
            string        date2      = this.Request.Form["Date2"];
            string        str1       = this.Request.Form["sidx"];
            string        str2       = this.Request.Form["sord"];
            int           pageSize   = Tools.GetPageSize();
            int           pageNumber = Tools.GetPageNumber();
            string        order      = (str1.IsNullOrEmpty() ? "WriteTime" : str1) + " " + (str2.IsNullOrEmpty() ? "asc" : str2);
            long          count;
            DataTable     pagerData  = new RoadFlow.Platform.Log().GetPagerData(out count, pageSize, pageNumber, title, type, date1, date2, userID, order);
            List <object> objectList = new List <object>();

            foreach (DataRow row in (InternalDataCollectionBase)pagerData.Rows)
            {
                objectList.Add((object)new
                {
                    ID        = row["ID"].ToString(),
                    Title     = row["Title"].ToString(),
                    Type      = row["Type"].ToString(),
                    WriteTime = row["WriteTime"].DateFormat("yyyy-MM-dd HH:mm:ss"),
                    UserName  = row["UserName"].ToString(),
                    IPAddress = row["IPAddress"].ToString(),
                    Opation   = ("<a class=\"viewlink\" href=\"javascript:void(0);\" onclick=\"detail('" + row["ID"].ToString() + "');return false;\">查看</a>")
                });
            }
            return("{\"userdata\":{\"total\":" + (object)count + ",\"pagesize\":" + (object)pageSize + ",\"pagenumber\":" + (object)pageNumber + "},\"rows\":" + objectList.ToJsonString() + "}");
        }
Пример #2
0
        public ActionResult Index()
        {
            RoadFlow.Platform.Log log = new RoadFlow.Platform.Log();
            // ISSUE: reference to a compiler-generated field
            if (LogController.\u003C\u003Eo__0.\u003C\u003Ep__0 == null)
            {
                // ISSUE: reference to a compiler-generated field
                LogController.\u003C\u003Eo__0.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "TypeOptions", typeof(LogController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                {
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            object obj1 = LogController.\u003C\u003Eo__0.\u003C\u003Ep__0.Target((CallSite)LogController.\u003C\u003Eo__0.\u003C\u003Ep__0, this.ViewBag, log.GetTypeOptions(""));
            string str  = string.Format("&appid={0}&tabid={1}", (object)this.Request.QueryString["appid"], (object)this.Request.QueryString["tabid"]);

            // ISSUE: reference to a compiler-generated field
            if (LogController.\u003C\u003Eo__0.\u003C\u003Ep__1 == null)
            {
                // ISSUE: reference to a compiler-generated field
                LogController.\u003C\u003Eo__0.\u003C\u003Ep__1 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "Query", typeof(LogController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                {
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            object obj2 = LogController.\u003C\u003Eo__0.\u003C\u003Ep__1.Target((CallSite)LogController.\u003C\u003Eo__0.\u003C\u003Ep__1, this.ViewBag, str);

            return((ActionResult)this.View());
        }
Пример #3
0
        public ActionResult Index(FormCollection collection)
        {
            string title  = string.Empty;
            string type   = string.Empty;
            string date1  = string.Empty;
            string date2  = string.Empty;
            string userid = string.Empty;

            if (collection == null)
            {
                title  = Request.QueryString["Title"];
                type   = Request.QueryString["Type"];
                date1  = Request.QueryString["Date1"];
                date2  = Request.QueryString["Date2"];
                userid = Request.QueryString["UserID"];
            }
            else
            {
                title  = collection["Title"];
                type   = collection["Type"];
                date1  = collection["Date1"];
                date2  = collection["Date2"];
                userid = collection["UserID"];
            }

            ViewBag.Title1 = title;
            ViewBag.Type   = type;
            ViewBag.Date1  = date1;
            ViewBag.Date2  = date2;
            ViewBag.UserID = userid;

            RoadFlow.Platform.Log blog = new RoadFlow.Platform.Log();
            string query = string.Format("&appid={0}&tabid={1}&Title={2}&Type={3}&Date1={4}&Date2={5}&UserID={6}",
                                         Request.QueryString["appid"],
                                         Request.QueryString["tabid"],
                                         title.UrlEncode(),
                                         type.UrlEncode(),
                                         date1,
                                         date2,
                                         userid
                                         );
            string pager;

            System.Data.DataTable dt = blog.GetPagerData(out pager, query, title, type, date1, date2, userid);
            ViewBag.TypeOptions = blog.GetTypeOptions(type);
            ViewBag.Pager       = pager;
            ViewBag.Query       = query;
            return(View(dt));
        }
Пример #4
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string title = context.Request.QueryString["title"];
            string page;

            System.Data.DataTable     dt = new RoadFlow.Platform.Log().GetPagerData(out page, "", title, "", "", "", "");
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            foreach (System.Data.DataRow user in dt.Rows)
            {
                sb.Append("<tr><td value='" + user["ID"] + "'>" + user["Title"] + "</td><td>" + user["Type"] + "</td><td>" + user["UserName"] + "</td><td>" + user["WriteTime"] + "</td></tr>");
            }
            context.Response.Write("{\"count\":" + new RoadFlow.Platform.Log().GetCount() + ",\"data\":\"" + sb.ToString() + "\"}");
        }
Пример #5
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string values = context.Request.QueryString["values"];
            string xx;
            var    logs = new RoadFlow.Platform.Log().GetPagerData(out xx, "", "", "", "", "", "");

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (System.Data.DataRow dr in logs.Rows)
            {
                string selected = ("," + values + ",").Contains("," + dr["ID"].ToString() + ",", StringComparison.CurrentCultureIgnoreCase)
                    ?" selected=\"selected\"":"";
                sb.AppendFormat("<option value=\"{0}\"{1}>{2}</option>", dr["ID"], selected, dr["Title"]);
            }
            context.Response.Write(sb.ToString());
        }
Пример #6
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     long count=0;
     string title = context.Request.QueryString["title"];
     string type = context.Request.QueryString["type"];
     string date1 = context.Request.QueryString["date1"];
     string date2 = context.Request.QueryString["date2"];
     string userid = context.Request.QueryString["userid"];
     string size = context.Request.QueryString["pagesize"];
     string number = context.Request.QueryString["pagenumber"];
     RoadFlow.Platform.Log blog = new RoadFlow.Platform.Log();
     System.Data.DataTable dt = new System.Data.DataTable(); //blog.GetPagerData(out count, size.ToInt(), number.ToInt(), "", title, type, date1, date2, userid);
     string data = RoadFlow.Utility.Tools.DataTableToJsonString(dt);
     context.Response.Write("{\"count\":" + count.ToString() + ",\"data\":" + data + "}");
 }
Пример #7
0
        public string GetData()
        {
            long   count  = 0;
            string title  = Request.QueryString["title"];
            string type   = Request.QueryString["type"];
            string date1  = Request.QueryString["date1"];
            string date2  = Request.QueryString["date2"];
            string userid = Request.QueryString["userid"];
            string size   = Request.QueryString["pagesize"];
            string number = Request.QueryString["pagenumber"];

            RoadFlow.Platform.Log blog = new RoadFlow.Platform.Log();
            System.Data.DataTable dt   = new System.Data.DataTable();// blog.GetPagerData(out count, size.Convert<int>(), number.Convert<int>(), "", title, type, date1, date2, userid);
            string data = RoadFlow.Utility.Tools.DataTableToJsonString(dt);

            return("{\"count\":" + count.ToString() + ",\"data\":" + data + "}");
        }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string title  = string.Empty;
            string type   = string.Empty;
            string date1  = string.Empty;
            string date2  = string.Empty;
            string userid = string.Empty;

            if (!IsPostBack)
            {
                title  = Request.QueryString["Title1"];
                type   = Request.QueryString["Type"];
                date1  = Request.QueryString["Date1"];
                date2  = Request.QueryString["Date2"];
                userid = Request.QueryString["UserID"];
            }
            else
            {
                title  = Request.Form["Title"];
                type   = Request.Form["Type"];
                date1  = Request.Form["Date1"];
                date2  = Request.Form["Date2"];
                userid = Request.Form["UserID"];
            }

            RoadFlow.Platform.Log blog = new RoadFlow.Platform.Log();
            Query = string.Format("&appid={0}&tabid={1}&Title={2}&Type={3}&Date1={4}&Date2={5}&UserID={6}",
                                  Request.QueryString["appid"],
                                  Request.QueryString["tabid"],
                                  title.UrlEncode(),
                                  type.UrlEncode(),
                                  date1,
                                  date2,
                                  userid
                                  );
            string pager;

            Dt = blog.GetPagerData(out pager, Query, title, type, date1, date2, userid);
            this.TypeOptions.Text = blog.GetTypeOptions(type);
            this.Pager.Text       = pager;
        }
Пример #9
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string values = context.Request.QueryString["values"];

            System.Text.StringBuilder texts = new System.Text.StringBuilder();
            RoadFlow.Platform.Log     Log   = new RoadFlow.Platform.Log();
            foreach (string value in values.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
            {
                if (value.IsGuid())
                {
                    var log = Log.Get(value.ToGuid());
                    if (log != null)
                    {
                        texts.Append(log.Title);
                        texts.Append(",");
                    }
                }
            }
            context.Response.Write(texts.ToString().TrimEnd(','));
        }