2023年2月20日

获取树形数据的全路径

摘要: 我们经常要用到树形数据,比如:部门、文章栏目、行政区划……,而且有时还需要用到这些数据的全路径,比如:四川省 > 遂宁市 > 船山区。 为了避免每次要使用全路径时都拼接一次,我们可以在数据库增加一个字段来保存全路径,并且使用触发器来生成全路径。 典型的表结构如下: 数据示例如下: 由于新增的节点都处 阅读全文

posted @ 2023-02-20 23:14 羊茂林 阅读(509) 评论(0) 推荐(1) 编辑

2021年4月26日

分页系列之五:WinForm + DevExpress 自制分页控件

摘要: 本例的运行环境为:.NET Framework 4.x,DevExpress版本为:18.1.11 添加用户控件,命名为PaginationControl,建议转换为XtraUserControl,不转好像也没什么问题,但既然用了DevExpress,还是转一下为好。 向用户控件中添加BarMana 阅读全文

posted @ 2021-04-26 20:18 羊茂林 阅读(1369) 评论(0) 推荐(0) 编辑

分页系列之四:微信小程序滚动加载分页数据

摘要: 在app.js中添加一个函数,其他页面加载分页数据时,统一调用这个函数。 App({ loadData: function (that, url, data) { that.setData({ loadText: '正在加载', loadClass: 'loadTip icon i-loading' 阅读全文

posted @ 2021-04-26 20:16 羊茂林 阅读(1486) 评论(0) 推荐(0) 编辑

分页系列之三:网页滚动加载分页数据

摘要: <!doctype html> <html> <head> <meta charset="utf-8"> <title>滚动加载示例</title> <style> html {_background:url(about:blank);}/*兼容IE6*/ body {font-size:12px; 阅读全文

posted @ 2021-04-26 20:15 羊茂林 阅读(336) 评论(0) 推荐(0) 编辑

分页系列之二:ASP.NET MVC 网页分页

摘要: PageHelper.cs using System; using System.Web; namespace MvcApp.CommonClass { public class PageHelper { /// <summary> /// 创建HTML分页代码 /// </summary> /// 阅读全文

posted @ 2021-04-26 20:12 羊茂林 阅读(152) 评论(2) 推荐(0) 编辑

分页系列之一:SQL Server 分页存储过程

摘要: 以下为最基本的代码结构,SQL Server 2012 开始支持 CREATE PROCEDURE procXXX @Page int, --当前页码,从1开始 @PageSize int --每页记录数 AS BEGIN SET NOCOUNT ON SELECT * FROM tbTest OR 阅读全文

posted @ 2021-04-26 20:11 羊茂林 阅读(349) 评论(0) 推荐(0) 编辑

2021年4月21日

WinForm只运行运行一个实例(单开)

摘要: using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; namespace xxx { static class Program { /// < 阅读全文

posted @ 2021-04-21 19:30 羊茂林 阅读(278) 评论(0) 推荐(1) 编辑

2016年9月17日

原创:纯CSS美化单复选框(checkbox、radio)

摘要: 最重要的一点,隐藏选择框本身。不多说了,上代码: <!doctype html> <html> <head> <meta charset="utf-8"> <title>选择框样式</title> <style> label {font-size:12px;cursor:pointer;} labe 阅读全文

posted @ 2016-09-17 00:27 羊茂林 阅读(15667) 评论(0) 推荐(0) 编辑

2016年8月29日

使用Font Awesome替换EasyUI的图标

摘要: 用过EasyUI的朋友都知道,大部分组件都有一个iconCls属性,用于显示一个图标。但是EasyUI自带图标数量少、不美观,于是想到了使用Font Awesome来更换和拓展这些图标。 先看看EasyUI的图标用法,下面定义了一个LinkButton。 <a class="easyui-linkb 阅读全文

posted @ 2016-08-29 16:27 羊茂林 阅读(4147) 评论(1) 推荐(2) 编辑

导航