如果你的才华不足以支撑你的野心时,请安静下来学习吧!

摘要: 好久没写博客了。都快忘了博客怎么写,代码怎么敲了。好了,言归正传。 最近在学习了解Mybatis框架的运用,可以不用写接口的实现类。就可以完成增删改查。觉得挺牛逼的。特来学习。嘻嘻 我用的是mybatis3.2.7和mysql ps:mybatis3.x之前的版本是ibatis 第一步:创建一个we 阅读全文
posted @ 2016-08-09 23:48 码农的独白 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 利用NPOI组件将数据中想要的数据导出到excel表格中。 demo如下 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using NPOI.HSSF.U 阅读全文
posted @ 2016-01-31 22:18 码农的独白 阅读(717) 评论(0) 推荐(0) 编辑
摘要: 用MD5进行密码的加密。写一个类用来存放MD5算法。using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Security.Cryptography;namespa... 阅读全文
posted @ 2016-01-19 21:32 码农的独白 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 新建一个.cs文件用来写生成图形验证码的方法,返回一个MemoryStream的参数。在Default.aspx中接收输出就可以了。1.下面是.cs的代码using System;using System.Collections.Generic;using System.Linq;using Sys... 阅读全文
posted @ 2016-01-19 11:12 码农的独白 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 当数据库中一个字段不是必填项时,在往数据库中插入数据的时候往往会插入一个空字符串就草草了事了。在这里用DBNull可以解决这个问题/// /// 插入数据 /// /// /// private void button2_... 阅读全文
posted @ 2016-01-15 11:09 码农的独白 阅读(5080) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Wind... 阅读全文
posted @ 2016-01-14 16:02 码农的独白 阅读(663) 评论(0) 推荐(0) 编辑
摘要: 有几天没有写东西,今天来写点关于数据库的东西。第一步:现在你自己的SQL Server数据库中创建一个新的数据库test,然后在里面新建一张表tb_user,在这张表中添加几个字段并为它赋值,具体结果看下图。第二步:在Visual studio 2010中新建一个Windows窗体程序。然后下图一样... 阅读全文
posted @ 2015-12-22 14:36 码农的独白 阅读(2342) 评论(2) 推荐(1) 编辑
摘要: 第一步:先创建一个WinForm窗体应用程序,按照下图所示的进行布局。第二步:为ComboxBox控件、checklistbox控件和listbox控件和button控件设置属性第三步:在代码中的窗体类中声明两个私有数组。private string[] names;private string[]... 阅读全文
posted @ 2015-12-18 14:55 码农的独白 阅读(1247) 评论(0) 推荐(0) 编辑
摘要: 今天写了一个WinForm的练习,将源代码贴出来和大家一起学习学习。首先:按照下图将一个button控件、三个RadioButton控件、三个CheckBox控件、一个Label控件和一个TrackBar控件。其次:如图 进度条是用来控制 ① 的字体大小的。 代码如下:using System;u... 阅读全文
posted @ 2015-12-17 18:01 码农的独白 阅读(2227) 评论(4) 推荐(2) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Demo1{ class Program { /// /// 求一个字符串... 阅读全文
posted @ 2015-12-16 21:08 码农的独白 阅读(1536) 评论(2) 推荐(0) 编辑

如果你的才华不足以支撑你的野心时,请安静下来学习吧!