protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["ID"])) { B_Admin badmin = new B_Admin(); if (!badmin.GetAdminLogin().IsSuperAdmin()) { function.WriteErrMsg("只有超级管理员才有权限访该页!!"); } B_DataList bll = new B_DataList(); M_DataList mod = bll.SelReturnModel(Convert.ToInt32(Request["ID"])); string tableinfo = ""; string tablelink = ""; if (Request["type"] == "data") { RunSelsql2(mod.TableName); tableinfo = "表数据"; tablelink = "<a href='DataListView.aspx?ID=" + Request.QueryString["ID"] + "' target='_self' >[表结构]</a>"; } else { RunSelsql(mod.TableName); tableinfo = "表结构"; tablelink = "<a href='DataListView.aspx?ID=" + Request.QueryString["ID"] + "&type=data' target='_self' >[表数据]</a>"; } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='DatalistProfile.aspx'>扩展功能</a></li><li><a href='RunSql.aspx'>开发中心</a></li><li><a href='DatalistProfile.aspx'>系统全库概况</a></li><li>" + tableinfo + tablelink + "</li>"); } }
protected void ShowDatas() { B_DataList bll = new B_DataList(); DataTable dt = bll.Sel(); string str = ""; if (dt.Rows.Count > 0) { string[,] arr = new string[dt.Rows.Count, 4]; for (int i = 0; i < dt.Rows.Count; i++) { arr[i, 0] = dt.Rows[i]["ThrShort"].ToString(); arr[i, 1] = dt.Rows[i]["Explain"].ToString(); arr[i, 2] = dt.Rows[i]["TableName"].ToString(); arr[i, 3] = dt.Rows[i]["SecShort"].ToString(); str += "citys[" + i + "]=new Array('" + arr[i, 0] + "','" + arr[i, 1] + "','" + arr[i, 2] + "','" + arr[i, 3] + "');"; } } ViewState["dataArr"] = "var citys=new Array();" + str; }