ERP存储过程的调用和树形菜单的加载(四)
引用:DAL;System.Data.SqlClient;System.Data;
namespace CommTool
{
public class SqlComm
{ /// <summary>
/// 根据指定条件,删除指定的表里面的数据
/// </summary>
/// <param name="tableName">指定表名</param>
/// <param name="condition">指定条件 需要Where</param>
/// <returns>bool</returns>
public static bool DeleteTableByCondition(string tableName, string condition)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tableName",tableName),
new SqlParameter("@condition",condition)
};
int count= DataBaseHelper.ExcuteSqlReturnInt("DeleteTableByCondition", CommandType.StoredProcedure, pars);
if (count > 0)
{
return true;
}
else
{
return false;
} } /// <summary>
/// 通用的修改方法
/// </summary>
/// <param name="tableName">指定表名</param>
/// <param name="columns">要修改的列 如" username='张三',pwd='123' "</param>
/// <param name="conditions">修改的条件,不需要where</param>
/// <returns>bool</returns>
public static bool UpdateTableByCondition(string tableName, string columns, string conditions)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tableName",tableName),
new SqlParameter("@columns",columns),
new SqlParameter("@conditions",conditions) }; int count = DataBaseHelper.ExcuteSqlReturnInt("UpdateTableByCondition", CommandType.StoredProcedure, pars);
if (count > 0)
{
return true;
}
else
{
return false;
} } /// <summary>
/// 通用的添加功能存储过程
/// </summary>
/// <param name="tbName">指定要添加的表名</param>
/// <param name="fldName">指定要添加哪些列 如username,pwd,departmentid</param>
/// <param name="fldValue">指定哪些列对应的值 如'张三','123',1</param>
/// <returns>bool</returns>
public static bool CommInsertTable(string tbName, string fldName, string fldValue)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tbName",tbName),
new SqlParameter("@fldName",fldName),
new SqlParameter("@fldValue",fldValue) }; int count= DataBaseHelper.ExcuteSqlReturnInt("CommonInsertProc", CommandType.StoredProcedure, pars);
if (count > 0)
{
return true;
}
else
{
return false;
} } /// <summary>
/// 根据表名查询数据
/// </summary>
/// <param name="tableName">要查询的表</param>
/// <returns>dataset</returns>
public static DataSet GetDataByTableName(string tableName)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tableName",tableName)
};
return DataBaseHelper.SelectSQLReturnDataSet("GetDataByTableName", CommandType.StoredProcedure, pars);
} /// <summary>
/// 查询指定表,指定列所有数据
/// </summary>
/// <param name="tableName">指定表名</param>
/// <param name="columns">指定列名</param>
/// <returns>DataSet</returns>
public static DataSet GetDataByTableNameValue(string tableName, string columns)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tableName",tableName),
new SqlParameter("@columns",columns)
}; return DataBaseHelper.SelectSQLReturnDataSet("getDataByTableNameValue", CommandType.StoredProcedure, pars); } /// <summary>
/// 查询指定列,指定表,指定条件的数据
/// </summary>
/// <param name="tableName">指定的表名</param>
/// <param name="columns">指定列名</param>
/// <param name="condition">指定的条件 不需要写where,直接跟条件</param>
/// <returns>DataSet</returns>
public static DataSet GetDataByCondition(string tableName, string columns, string condition)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@tableName",tableName),
new SqlParameter("@columns",columns),
new SqlParameter("@condition",condition)
}; return DataBaseHelper.SelectSQLReturnDataSet("GetDataByCondition", CommandType.StoredProcedure, pars); } /// <summary>
/// 通用的分页方法
/// </summary>
/// <param name="table">要查询的表或视图</param>
/// <param name="coumlns">要查询的列</param>
/// <param name="pk">主键</param>
/// <param name="condition">查询的条件</param>
/// <param name="pageindex">页码</param>
/// <param name="pagesize">每页显示条数</param>
/// <returns>DataTable</returns>
public static DataTable getDataByPageIndex(string table, string coumlns, string pk, string condition, int pageindex, int pagesize)
{
SqlParameter[] pars = new SqlParameter[]{
new SqlParameter("@table",table),
new SqlParameter("@coumlns",coumlns),
new SqlParameter("@pk",pk),
new SqlParameter("@condition",condition),
new SqlParameter("@pageindex",pageindex),
new SqlParameter("@pagesize",pagesize)
}; return DataBaseHelper.SelectSQLReturnTable("getDataByPageIndex", CommandType.StoredProcedure, pars); } }
}
二:后台管理系统中常用的导航菜单设计
1.通过静态的Ul,li标签设计
2.通过XML文件进行配置,绑定到TREEVIEW控件
3.通过数据库设计,绑定到TREEVIEW控件
三:树形菜单的设计原理:
1.查询顶级节点菜单
2.遍历顶级菜单至树形控件
3.查询下一级菜单绑定至顶级菜单
四:TreeView控件的用法
1.TreeNode:TreeView 节点对象
2.NavigateUrl:导航
3.ChildNodes:子节点对象
具体的代码:
一:添加导航
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaEAAAFPCAIAAABrhOZnAAAgAElEQVR4nO2dP4jrWLbuFdzghB3coMJXMEEV3OAWdNCGmxxDB+XMlU3BCwoxQeHImBcYc5OHqGAwJxiEg4txMCAHDXZQ4MpkGhrsoMEVFKiCATnoQMEECk6gYIJ1A8ny1v9t/bG87e/H4iDL25J8bH+19idpLenuvhMKKsZ4rtsOuSGPnIcXu9m3Gl3z7tlsLRvD9w4RWWT23h8e3m+b86vD92Cp7UZvyazYaq0bRSciWvVuZHXrD3OXV70bf7ylthtXbc2MbmepXPmvXSq7MWRO5Ctv48z42AFbrdVf7TbnH8mqd9NoTaz9XtwXbrXWbnfxu6DQka/UiRVcQ3rffRU4Fv8i6w/Lsiw7iPPdcf8Nhf1PO/r7ig7LjFKOXZIOeEoJrvIfKpIUitCw0Pqk7XAeWClItz89+P/77nLBLarThWWTG6ZFpkXG1jEs2nw6D8vrwbtMRKazUT47yrZ3O/9y+B4std24utlFWzMzNM7VL3e8rE4UVuMC24nbRauv7DbuipE7MnXATePqJixVu/V7VfIHM1uIle/gC/drgiPBEThc46K/r7o0jpLV5CCNS9o4+xS/xlUtcEQkVZHHmRZtPq3Vu6m/m4ulsVga2ttGe9s8vN0OPlvyuqlZKhFtaPVlUv1bDMGkYAAchsh5nEtUU2JV5lCN4xwfengEgSNf49i/NgW3qE71xn3n7l5u3Mt39zK7fNu9e1xfN9dX6laxyBpaSutbq5S3cQDQOJCbvBrH/r7q1TiKKEsRjePRstA8N32/VVB+HpdO761zO/3hh6kkjaTW6OgCR9A4UADx8zgXX1+SBC7kqcU+TDHjQs/6D/2FowkcVe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6hNHs4Cif0Lc5DGOSk9azxR87XJW9inYK+DUOFMvw4wM7UMaV9Mh9ZIapa0BWeXNvJ7eQiEF8U1jv195TiA2uThLJDYvzDusvtEkTzOa+bA9HBYdN2GhDuJCZyX8CNF4yLa5PeC+M7maCkat18DpUMcFIX9uMDvK8cB1CYPZ0EVfpzjuKLWZbqmvg6uugOm96DOdqhZdJmZ5u66E6Y5YZzGMSoZHJmgcR/j4WtkJQLBEfDjhCanH5fds+Z1ELyWTe+EujQknTHoDiJnBmLPxu4nsM3uICGP201m22ODbTSBZhGIQwJ+nNDk8eMyro9DIM4r4McJTR4/DoG4qIAfJzR5/DgE4qICfpzQ5PHjEIiLCvhxQpPHj0MgLirgxwlNmh+HQCDc8H4u8OMEJNGPAwCEgR8nIP8Lby9jaCfwAC4AAAAASUVORK5CYII=" alt="" />
效果:(当然有很多样式,可以自行修改)
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI8AAADCCAIAAAD/xwZ2AAAInklEQVR4nO2dPW7jOhSFuYRZyswSngAX02YLrxoILgxthXARuH1LcAoBGqRyigHSDGAXBpQFpHCRgkUKvYIyTUkURcmSyKuci4OApkj6+n7mjygGZsX7fxAVMe8eQO4CLUoCLUpihcl+/DoY82FeTOFop/VZjKd8t2I1ix7zni1Eu7dbTrZh0WNe/E7YapcP8ip/THZvRfE7SX6H5mGWVKvMTOuqt100PLiRFr4sYZXQ9Fe+2+zyzyLbJFlIHuaPEWOM3UMr21y/b5us/Kiras55F62SpMyMdmetYlmluBa7+nGrkmTypaytF9Bz9LppYsisls82LEmrQbwWvn2cq8mSc3q4a3evUmUALf37ws9FkSYKG9/w/LMozjySl0pHeW6mxaPrpUqVz5yvyu/4NcrGnLK8IqE1WC+fb6Nom8takXQyTaLt9bufJklaFGeebKvD3VweRqt293QfHGkJ3dJEDeb8LMSZR4yxFc9VAfkG5YssYUkmTKYXq6X1CWObG3KEkAAq7atGjC2seC6yZJPl2yhJhfwrLd8m/CxEmqicuT3cJK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8cdDFWzwlErGre/Rnm2/BuJftS/bXWt+5sekRrDjIzDDuONqdvoHWveaYVpoXspzdaytC3HA206gZaZcttF4KiVTSGPt/u3Ky5JpzuvcjQCtbmDBRo3WugRclAi5KBFiUDLUoGWpQMtChZELRgARpoUTLQomSgRclAi5KBFiUDLUoGWpQMtCgZaFEy0KJkoEXJQIuSgRYl+x9g5JtrTgFUyAAAAABJRU5ErkJggg==" alt="" />
数据库的设计:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQwAAAC4CAIAAACZwkUTAAAS3klEQVR4nO2df3AUVwHH49+djo5T204HxWrtTKbMqFOociraUB0s+GNsdRzUMhP16A8q5cDMYGpHm5LagOQCDdLQNBBC0yMRKoSDQhpoIYAplN9N6aWNJPxIQhJumsAluSPrH3u3997u2317t7fZ3ZfvZ/aPy97+yt377Ht7+7778iQAgCF5Th8AAG4HkgDAAZIAwAGSAMDBLkn+2Xh15da+lVv7Xnqj7++1vUWv9jz58pUFqy4/suLSnGcvfr+oe9afu01tKOzP8wUjkiRJkaAvzx+26XgB0MVGSWoPStX7x9fvS6wJx1e+OVbSMFr8+siyjdcXVV1f+K/rs545Y2pDkAQ4jSlJ9u5rrmCxd1+z3ir/bLy6amvfS6G+v9b2PvNKT2H55UdXXPrRX7q/s7T7W0u6vh3ofuDx46YOMAeSZLEihARpTElSUVGRYFFRUaG3Sn34WGI8oZpiY/Fr1+OXr4119IzO/MlCUwcISYDTZCxJfkHAvCQH2iLylBhPvHXow10HPtjefObytbGdzW2GkoT9eQSUJOm3iEJMLq8q28Rbye2k5yRnyJtOr65dBUxqzEoyFo/LU35BQHmdUU1CViNbd/9XX5KwnyjpYT8lSfqd9FLEIuq1ZchqIV0xpeczqg3UJCBNBpLM/X09OZmR5EBb5O2jH7116MPYWHx785mte05t2Xni1IVY7Y6jupKQxVgyaG6l/lQtzyjfxBy6ikpVFfJcciuQBKQxK8nAQL885RcElNcmaxKyDjl1IXY0cuPVbbZKomok0ZLotqDkmkp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pumvavVOZu0s9HkT+MVjJeUMSYAkX3SdZ82JRtLO27/jirj1zItseOB+adnrT146s/3Lz6qnbSr7Y8NydoeLbaoruWrfkS3dPuZ25u7CffLgPfgIGucFFd9zLX1i2YvlTRYsW/PG3P39k7oM/mPmNr+d/5e4pt9/x+Vu1k9MHCyYRLpIEAHcCSQDgAEkA4ABJAOAASQDgAEkA4ABJAODwf124Ny0MoMWaAAAAAElFTkSuQmCC" alt="" />
代码:
public partial class MenuLeft : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CreateTreeVeiw();
}
} DataSet ds;
DataTable dt;
private void CreateTreeView()
{
ds = SqlComm.GetDataByTableName("TreeMenu"); } private void CreateTreeVeiw()
{
ds = SqlComm.GetDataByTableName("TreeMenu");
dt = new DataTable();
//取出第一个值
dt = ds.Tables[0];
//数据视图 在dt中选择想要的数据
DataView dv = new DataView(dt, "ParentId=0", "NodeId", DataViewRowState.CurrentRows);
//遍历父节点
foreach (DataRowView d in dv)
{
//创建一个TreeNode对象
TreeNode n = new TreeNode(d["Text"].ToString(), d["Url"].ToString());
//指定相应的属性
n.NavigateUrl = d["Url"].ToString();
n.ImageToolTip = dt.TableName;
//给树形菜单赋值
TreeView1.Nodes.Add(n);
//根据父节点筛选出对应的子节点
dv = new DataView(dt, "ParentId='" + d["NodeId"] + "'", "NodeId", DataViewRowState.CurrentRows);
if (dv.Count>0)
{
CreateSubTreeView(n, dv); }
} } /// <summary>
/// 添加子项
/// </summary>
/// <param name="n"></param>
/// <param name="dv"></param>
private void CreateSubTreeView(TreeNode n, DataView dv)
{
foreach (DataRowView d in dv)
{
TreeNode cn = new TreeNode(d["Text"].ToString(), d["Url"].ToString());
cn.NavigateUrl = d["Url"].ToString();
n.ChildNodes.Add(cn);
DataView sdv = new DataView(dt, "ParentId='" + d["NodeId"] + "'", "NodeId", DataViewRowState.CurrentRows);
if (sdv.Count > 0)
{
//实现了递归
CreateSubTreeView(cn, sdv);
} }
} }
ERP存储过程的调用和树形菜单的加载(四)的更多相关文章
- 前框 (一个)zTree 从数据库树形菜单动态加载
这些天做动态菜单使用此插件.现在有一个非常广泛的开源框架,最新QUI框架是菜单部分使用这个插件开发,因此,它是非常值获取深入的研究和探讨,通过使用非常丰富的感觉功能,己开发和编写,官网上有非常详尽的A ...
- 雷林鹏分享:jQuery EasyUI 树形菜单 - 树形网格惰性加载节点
jQuery EasyUI 树形菜单 - 树形网格惰性加载节点 有时我们已经得到充分的分层树形网格(TreeGrid)的数据. 我们还想让树形网格(TreeGrid)按层次惰性加载节点. 首先,只加载 ...
- 雷林鹏分享:jQuery EasyUI 树形菜单 - 树形网格动态加载
jQuery EasyUI 树形菜单 - 树形网格动态加载 动态加载树形网格有助于从服务器上加载部分的行数据,避免加载大型数据的长时间等待.本教程将向您展示如何创建带有动态加载特性的树形网格(Tree ...
- 转:PHP教程之PHP调用session_start后页面始终加载的问题研究
今天群里有朋友说他的遇到一个有趣的问题: 一个PHP页面的执行时间比较长(15秒左右),而只要这个页面没有执行完毕,其他的页面访问都是长时间加载状态,只有那个页面执行完毕了,剩下的页面才能打开. 这是 ...
- C#调用DLL文件提示试图加载格式不正确的程序
最近在调用第三方的DLL遇到了一个问题:试图加载格式不正确的程序,找了好久发现都没有解决问题,一直报错,后来发现是程序编译时的配置错了,要将项目->属性->平台选中release-X86 ...
- CSS实现树形结构 + js加载数据
看到一款树形结构,比较喜欢它的样式,就参照它的外观自己做了一个,练习一下CSS. 做出来的效果如下: li { position: relative; padding: 5px 0; margin:0 ...
- <asp:Button点击查询后,调用js中函数展现加载圈
<div> <div id='paneloading' style='display:none;position:fixed;top:0px;left:0px;z-index:999 ...
- vue实现menu菜单懒加载
本文将在vue+element ui项目中简单实现menu菜单的懒加载. 最近接到这样的需求:菜单的选项不要固定的,而是下一级菜单选项需要根据上级菜单调接口来获取.what? 这不就是懒加载吗?翻了一 ...
- AntDesign vue学习笔记(五)导航菜单动态加载
一般的后台系统都有一个树形导航菜单,具体实现如下,主要参考https://my.oschina.net/u/4131669/blog/3048416 "menuList": [ { ...
随机推荐
- 定向转发和重定向实现 <select >下拉表单数据传送
定向转发的特点: (1). 实行转发时浏览器上的网址不变 (如果你这点忽视了,那你就要接受我无尽的鄙视吧! 哇咔咔~~~) (2). 实行转发时 : 只有一次请求. 不信,看这下面的 ...
- 《算法导论》笔记---附录 B.5 树
遇到同样的问题,在豆瓣上转过来记录下. 以下内容转自:http://book.douban.com/annotation/16409380/ -------------------分割线------- ...
- css改变图片的颜色
参考大神张鑫旭:http://www.zhangxinxu.com/wordpress/2016/06/png-icon-change-color-by-css/ 主要知识点:border-right ...
- js刷新页面和跳转
javascript返回上一页: 1.返回上一页 history.go(-1); 返回上两个页面 history.go(-2); <a href="javascript:history ...
- 3D MAX在立方体的使用
3D MAX不会“复用”立方体的顶点-----它直接计算该立方体需要12个三角面,每个三角面需要3个顶点,这样一共是36个顶点-----其实有大量顶点的位置是相同的,但3D MAX不管这些.它认为 ...
- 如何删除 Ubuntu 上不再使用的旧内核
提问:过去我已经在我的Ubuntu上升级了几次内核.现在我想要删除这些旧的内核镜像来节省我的磁盘空间.如何用最简单的方法删除Ubuntu上先前版本的内核? 在Ubuntu上,有几个方法来升级内核.在U ...
- eclipse关联tomcat并且部署java web应用程序
http://www.ibm.com/developerworks/cn/opensource/os-eclipse-tomcat/
- IoTimerInLineHook
#ifndef CXX_IOTIMERINLINEHOOK_H # include "IoTimerInlineHook.h" #endif ULONG32 SSDT_NtOpen ...
- [Js]面向对象基础
一.什么是对象 对象是一个整体,对对外提供一些操作 二.什么是面向对象 使用对象时,只关注对象提供的功能,不关注其内部细节,比如Jquery 三.Js中面向对象的特点 1.抽象:抓住核心问题 2.封装 ...
- Validform自定义提示效果-使用自定义弹出框
$(function(){ $.Tipmsg.r=null; $("#add").Validform({ tiptype:function(msg){ layer.msg(msg) ...