来自oracle的Asp.net中的Google组织结构图 [英] Google Organizational Chart in Asp.net from oracle

查看:117
本文介绍了来自oracle的Asp.net中的Google组织结构图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在网上制作组织结构图,使用sql命令从oracle获取数据,我搜索了很多,并找到了Google的组织结构图。所以我试图将数据传递给js代码,但我不知道如何以JSON格式发送数据。



I need to make an organizational chart in a web from using sql command getting data from oracle, I have searched so much and found Google's Organization chart. So I am trying to pass the data to the js code but i don't know what to do to send the data in JSON format.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="Test4.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
        google.load('visualization', '1', { packages: ['orgchart'] });
        google.setOnLoadCallback(drawChart);
        function drawChart() {
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Node');
            data.addColumn('string', 'Parent');
            data.addRows(JSON.parse(document.getElementById("<%=HiddenField1.ClientID%>").value));


            var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
            chart.draw(data);
        }
    </script>
</head>
<body>
    <div id='chart_div'>
    </div>
    <form id="as" runat="server">
        <asp:HiddenField ID="HiddenField1" runat="server" />
    </form>
</body>
</html>

推荐答案

http:// forums .asp.net / p / 1984303 / 5687261.aspx?Re + Google + Organizational + Chart + in + Asp + net + from + oracle [ ^ ]


这篇关于来自oracle的Asp.net中的Google组织结构图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆