- 博客(13)
- 收藏
- 关注
原创 C# Socket编程
//初始化private void myUdp(){Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);//IP address of the server machineIPAddress ipAddress = IPAddress.L
2009-10-26 13:56:00
618
原创 SQL 选择刚插入的一条记录插入到另一个表中
INSERT INTO [Job](fType, IsType) (SELECT MAX(fType), 1 FROM jType);
2009-07-28 10:13:00
950
转载 验证码
public void ValidateImg() { // 创建一个包含随机内容的验证码文本 System.Random rand = new Random(); int len = rand.Next(4, 4); char[] chars = "023456789ABCDEFGHJKLMNOPQRSTUVWXY
2009-07-28 10:09:00
515
原创 SQLHelper
public class SQLHelper{ public static string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectString"].ConnectionString; public SQLHelper()
2009-07-28 09:04:00
779
原创 MSDN Web技术
http://www.microsoft.com/china/msdn/library/webservices/WebApp/us0501WebQA.mspx?mfr=true
2009-07-09 19:05:00
614
原创 C#日记7--冒泡排序
冒泡排序 string[] names = fileName; bool exchange; for (int i = 0; i < names.Length; i++) { exchange = false; for (int j = name
2009-01-16 17:36:00
350
原创 C#日记6-- 制作安装包中添加数据库
public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); try { string targetdir = th
2009-01-09 17:28:00
659
1
原创 C# 日记5--Winform属性窗口
/// /// 偏移方向 /// public enum DirectionEnum { Down = 1, Right } public class InputViewSource { private string name; private Dire
2009-01-04 19:22:00
789
转载 C#日记4--Winform获取IP
string strHostName = Dns.GetHostName(); //得到本机的主机名IPHostEntry ipEntry = Dns.GetHostByName(strHostName); //取得本机IPif (ipEntry.AddressList.Length > 0){ string ip = ipEntry.AddressList[0].ToString(); }
2009-01-03 11:48:00
1480
1
原创 C#日记3--导出Excel
#region (使用模版)将DataTable的数据导出显示为报表 private DateTime beforeTime; //Excel启动之前时间 private DateTime afterTime; //Excel启动之后时间 /// /// 将DataT
2008-12-31 18:16:00
648
原创 C#日记2--Gridview
//分页protected void gvLogs_PageIndexChanging(object sender, GridViewPageEventArgs e) { if (e.NewPageIndex > gvLogs.PageCount) { gvLogs.PageIndex = gvLogs.PageCount; } else
2008-12-28 10:35:00
460
原创 C#日记1--JavaScript弹出框
某个操作弹出了框,确定后,点击后退,框复又弹出,加一句history.back();暂时解决问题 Page.ClientScript.RegisterStartupScript(this.GetType(), "Alert", "function window.onload() {alert(弹出成功!); history.back();}");
2008-12-27 11:34:00
687
原创 windows service
一、新建工程二、添加Timer类Service1.Designer.cs文件中private void InitializeComponent() { components = new System.Comp
2008-10-10 17:51:00
465
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人