Ejemplo n.º 1
0
    private void  GetAllRepPlanCode()
    {
        List <RepetitivePlan> list = rpbll.GetList(u => u.PlanState == "end" && u.Creator == User.ID);
        ArrayList             arr  = new ArrayList();

        foreach (var item in list)
        {
            arr.Add(new { id = item.RepetPlanID, text = item.Code });
        }
        Response.Clear();
        Response.Write(JsonConvert.SerializeObject(arr));
        Response.ContentType = "application/json";
        Response.End();
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 查询数据
    /// </summary>
    private void QueryData()
    {
        int page = Convert.ToInt32(Request.Form["page"] ?? "0");
        int size = Convert.ToInt32(Request.Form["rows"] ?? "0");

        // string sort = Request.Form["sort"] ?? "";
        // string order = Request.Form["order"] ?? "";
        if (page < 1)
        {
            return;
        }
        int pageCount = 0;
        int rowCount  = 0;
        // string orderField = sort.Replace("JSON_", "");
        var strWhere = GetWhere();
        var pageList = bll.GetList(page, size, out pageCount, out rowCount, strWhere);
        var strJSON  = Serializer.JsonDate(new { rows = pageList, total = rowCount });

        Response.Write(strJSON);
        Response.ContentType = "application/json";
        Response.End();
    }