コード例 #1
0
    private string getDatalist()
    {
        string  res = "";
        DataSet ds  = LeaveStockInfoManage.GetDatalistInfo();

        if (ds != null)
        {
            res = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(ds.Tables[0].Rows.Count, ds.Tables[0]);
        }
        return(res);
    }
コード例 #2
0
    private string getDataType()
    {
        string  res     = "";
        string  needAll = Request.Params["needAll"];
        DataSet ds      = LeaveStockInfoManage.GetDatalistInfo();

        if (ds != null)
        {
            if (needAll != null)
            {
                DataTable dt = ds.Tables[0];
                if (dt != null)
                {
                    DataRow dr = dt.NewRow();
                    dr["type"] = "全部";
                    dt.Rows.InsertAt(dr, 0);
                }
            }
            res = JsonHelper.DataTable2Json(ds.Tables[0]);
        }
        return(res);
    }