• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
wjshan0808

Learn from yesterday, Live for today, For a better tomorrow.
 ————wjshan0808

博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  C#

上一页 1 2 3 4 5 6 下一页
对数据的增删查改深度理解三(多)层编程理念

摘要:比较容易遗忘的代码:UI层: private void btnSelect_Click(object sender, EventArgs e) { if (txtIDCar.Text.Trim().Length == 18) { DeliverData deliver = new DeliverData(); TblPerson person = null; if ((person = deliver.Select(txtIDCar.... 阅读全文
posted @ 2014-02-28 02:43 wjshan0808 阅读(278) 评论(0) 推荐(0)
用用户登录简单理解三层思想

摘要:项目文件列表:GetUserLoginState.sc public class GetUserLoginState { /// /// 检测用户登录状态 /// public GetUserLoginState() { } //推荐在此定义类型变量,而不是在方法中new一个新的对象 private TLoginModel model; public UserLoginStateEnum LoginState(string userName, strin... 阅读全文
posted @ 2014-02-24 20:04 wjshan0808 阅读(289) 评论(0) 推荐(0)
用简单的修改数据理解三层概念

摘要:项目文件列表:文件中值得注意的代码:DataManager.cs: public List GetDataList() { List models; SqlHelper sqlhelper = new SqlHelper(); string sql = "select * from MyOrders"; using (SqlDataReader reader = sqlhelper.ExecuteReader(sql, null)) { ... 阅读全文
posted @ 2014-02-24 19:51 wjshan0808 阅读(211) 评论(0) 推荐(0)
单表数据加载到TreeView(.Node.Level>=2) "蝴蝶效应" SelectedNode注意事项 效能优化 综合问题

摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace 将单表数据加载到TreeView{ public pa... 阅读全文
posted @ 2014-02-22 00:53 wjshan0808 阅读(953) 评论(0) 推荐(0)
NPOI 操作数据库中数据的导入导出(Excel.xls文件) 和null数据的处理。

摘要:App.config: *.scusing NPOI.HSSF.UserModel;using NPOI.SS.UserModel;//using NPOI.HSSF.UserModel;using System;using System.Collections.Generic;using System.ComponentModel;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.I... 阅读全文
posted @ 2014-02-19 23:10 wjshan0808 阅读(1633) 评论(0) 推荐(0)
深拷贝浅拷贝[对象序列化]

摘要:using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Runtime.Serialization.Formatters.Binary;using System.Text;using System.Threading.Tasks;namespace 深拷贝浅拷贝_对象序列化_{ class Program { static void Main(string[] args) { #region 深浅拷贝原理... 阅读全文
posted @ 2014-01-15 23:33 wjshan0808 阅读(333) 评论(0) 推荐(0)
泛型<T>,是你肿莫了,还是我错了...

摘要:委托自定义数组排序 项目一共三个文件如下。CSort.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 委托自定义数组排序{ class CSort { public CSort() { } /// /// /// /// internal void Show(T[] a... 阅读全文
posted @ 2014-01-13 22:56 wjshan0808 阅读(2989) 评论(1) 推荐(0)
飞行棋(士) [窗口 控制台 自定义 版] 附源码

摘要:下载地址 :http://pan.baidu.com/s/1pJ0Nlwf http://pan.baidu.com/s/1hqgII1m效果 :哈哈,里面 Bug 和可优化的代码 不少 ... 阅读全文
posted @ 2014-01-05 17:15 wjshan0808 阅读(891) 评论(0) 推荐(0)
ip修改器

摘要:哈哈,算法来源于网络。。。源码:http://pan.baidu.com/s/11P0P9参考:http://bbs.csdn.net/topics/370201571 http://bbs.csdn.net/topics/380175680?page=1http://blog.csdn.net/tsinfeng/article/details/5879074截图 阅读全文
posted @ 2013-11-06 00:30 wjshan0808 阅读(158) 评论(0) 推荐(0)
C# wpf 实现 MD5加密解密 小工具

摘要:源文件: http://pan.baidu.com/share/link?shareid=2038099474&uk=3912660076 MD5 C# 实现代码来源于网络,感谢原系作者!参考资料:http://groups.csail.mit.edu/cis/md6/index.html http://www.blogjava.net/songfei/articles/17601.html http://md5.mmkey.com/HTML/ABOUT.HTM http://md5.mmkey.com/HTML/C_.HTM http://md5.mmkey... 阅读全文
posted @ 2013-06-26 12:14 wjshan0808 阅读(993) 评论(0) 推荐(0)
解决wpf项目中无法添加OpenFileDialog 实例的问题

摘要:直接添加引用:using Microsoft.Win32;或者放置鼠标于OpenFileDialogOpenFileDialog ofd = new OpenFileDialog();操作点击 阅读全文
posted @ 2013-06-25 16:05 wjshan0808 阅读(375) 评论(0) 推荐(0)
遍历form中的所有空间并找到选中的radiobutton

摘要:源文件: http://pan.baidu.com/share/link?shareid=1481950339&uk=3912660076参考:http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.aspxusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u 阅读全文
posted @ 2013-06-23 22:54 wjshan0808 阅读(452) 评论(0) 推荐(0)
计时器

摘要:源文件: http://pan.baidu.com/share/link?shareid=3199918884&uk=3912660076System.Threading.Timer is a simple, lightweight timer that uses callback methods and is served by thread pool threads. It is not recommended for use with Windows Forms, because its callbacks do not occur on the user interface t 阅读全文
posted @ 2013-06-23 15:44 wjshan0808 阅读(323) 评论(0) 推荐(0)
同一WpfApplication下简单的页面转换

摘要:别人写的很不错的Dome...分享学习下源文件地址 : http://pan.baidu.com/share/link?shareid=1698564707&uk=3912660076 阅读全文
posted @ 2013-06-20 23:55 wjshan0808 阅读(174) 评论(0) 推荐(0)
有关double数值应该注意的细节

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Form{ class Program { static void Main(string[] args) { Console.WriteLine("{0,4} :-> {1}", Convert.ToInt32(1.048), 1.048.ToString().Length);//1 :-> 5 Console.WriteLin... 阅读全文
posted @ 2013-04-29 15:05 wjshan0808 阅读(159) 评论(0) 推荐(0)
八种方法计算字符串中特定字符的数量

摘要:从网络上总结的,便于以后的学习(*^__^*) 嘻嘻……源文件:http://pan.baidu.com/share/link?shareid=432792&uk=3912660076using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace 求字符串中某个字符的数量{ /// /// 对于每个方法加个判断 /// str.IndexOf(char arg)>0 ? ///... 阅读全文
posted @ 2013-04-28 17:46 wjshan0808 阅读(1134) 评论(0) 推荐(0)
数组问题

摘要:数组:一组包含相同类型的变量值。(这里以int类型为例)源文件http://pan.baidu.com/share/link?shareid=426222&uk=3912660076一维数组: 声明,创建, 初始化和输出。 //一维数组 //1.声明一个 int[] array1 = new int[8]; foreach (int item in array1) { Console.Write(" " + item); } ... 阅读全文
posted @ 2013-04-24 17:11 wjshan0808 阅读(171) 评论(0) 推荐(0)
C#解决字符串中空格的八大方法.

摘要:今天编写小程序时,被字符串中出现的空格卡住了,”一怒之下“就搜罗了网络上的多种解决字符串中的空格的方法。呵呵,分享一下...实际上没有八种方法的,只是一个喜欢的标题,呵呵,你懂得....源文件http://pan.baidu.com/share/link?shareid=426222&uk=3912660076using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 去除空格{ class Program { static void Main(... 阅读全文
posted @ 2013-04-23 23:25 wjshan0808 阅读(2924) 评论(0) 推荐(0)
C# 创建Public无参构造函数的快捷键

摘要:ctor(Constructor) + Tab 2 次 :Public无参构造函数"~" + Tab1 次 :析构函数,嘻嘻,实际~键,tab键,shift键都在一条线上,打出析构函数后把“~”变成想要的修饰词(public,private,...)加个space,一样的...个人的习惯而已... 阅读全文
posted @ 2013-04-22 23:40 wjshan0808 阅读(724) 评论(0) 推荐(0)
C# 代码展开和折叠的快捷键

摘要:Ctrl+M + 光标所在块: 单击M折叠/双击M展开Ctrl+M+O:折叠所有块Ctrl+M+L:展开所有块还可以用 #region //code #endregion进行代码区域性管理。 阅读全文
posted @ 2013-04-14 01:57 wjshan0808 阅读(892) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3