
.Net
文章平均质量分 75
xlkun
这个作者很懒,什么都没留下…
展开
-
分页处理大量数据microsoft解决方案
using System; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Windows.Forms; public class PagingSample: Form { // Form controls. Button prevBtn = new Button();原创 2004-10-10 10:49:00 · 642 阅读 · 0 评论 -
只有数字字符的用户输入
当界面上要用户输入只有数字的字符时,默认的Textbox是不能胜任的,网上有很多网友们提供了很多的做法,我总结了一下写了一个在C#下的实现,做到了如下的几点:1:只能输入类似这样的字符:-123456.789;1234.789;2:在输入的字符串中不能存在两个点符:12456.78//正确;12.456.78//不正确;3:如果表示负数可以在字符串的最前面加一个减号“-”,也只能加到弟一个字符的位原创 2004-11-23 08:52:00 · 933 阅读 · 0 评论 -
正则表达式
首先让我们看两个特殊的符号^和$。他们的作用是分别指出一个字符串的开始和结束。例子如下:"^The":表示所有以"The"开始的字符串("There","The cat"等);"of despair$":表示所以以"of despair"结尾的字符串;"^abc$":表示开始和结尾都是"abc"的字符串——呵呵,只有"abc"自己了;"notice":表示任何包含"notice"的字符原创 2004-11-23 08:53:00 · 721 阅读 · 0 评论 -
数字小写转大写
//加到类的定义部分private static string[] cstr={"零","壹","贰","叁","肆", "伍", "陆","柒","捌","玖"};private static string[] wstr={"","","拾","佰","仟","萬","拾","佰","仟","億","拾","佰","仟"};//数字必须在12位整数以内的字符串//调用方式如:Label1.Te原创 2004-11-23 08:54:00 · 1479 阅读 · 1 评论 -
Net十种必备工具 .Net工具
.Net十种必备工具.Net工具http://www.hidotnet.com/documents/DotNetTools.htmDotNet开发人员现在应该下载的十种必备工具本文自发布以来已经增加了新信息。请参阅下面的编辑更新。本文讨论:• 用于编写单元测试的 NUnit• 用于创建代码文档资料的 NDoc• 用于生成解决方案的 N原创 2004-11-13 17:37:00 · 975 阅读 · 0 评论 -
在C#中使用LOG4NET
在C#中使用LOG4NET1.下载log4net (Google log4net)2.unzip log4net3.运行VS,新建 c# Windows应用程序。4.添加引用Log4NET5.新建一个应用程序配置文件App.config(具体内容附在后面)6.打开Form1.cs, 在Namespace上添加一行 [assembly: log4net.Config.DOMConfigura原创 2004-11-29 09:21:00 · 1187 阅读 · 0 评论 -
treeview
贴两个关于treeview的 //初始化选中节点function initchecknode(){ var node=TreeView1.getTreeNode("1"); node.setAttribute("Checked","true"); setcheck(node,"true"); FindCheckedFromNode(TreeView1);}//oncheck事件function原创 2004-11-29 09:13:00 · 836 阅读 · 0 评论 -
c#、vb.net 实现MD5加密
以下为MD5算法用c#的实现//MD5.cs//MD5 16-bit,32-bits algorithm implemented in C#using System;using System.Text;namespace Encrypter{ /// /// Summary description for MD5. /// public class MD5 { const int原创 2004-12-06 08:56:00 · 1492 阅读 · 0 评论 -
log4net配置
Logger hierarchy(层次级别)Logger都是已经命名的实体。Logger的名称区分大小写并遵循以下规则:1 如果A logger的名称如果是B logger名称的前缀(通过“.”连接),则说A logger是B logger的祖父级。2 如果A logger的名称和B logger的名称之间不存在其他的logger名称,则A logger是B logger的父级。原创 2005-02-17 09:16:00 · 1107 阅读 · 0 评论 -
DotNet 网上资源
相关网站列表http://blog.joycode.com/ 博客堂 主要是微软专家的帖子,内容较新http://www.cnblogs.com/ 博客园http://www.microsoft.com/resources/practices/default.mspx 模式和实践首页http://msdn.microsoft.com/smartclient/ 智能客户端首页http://msdn.原创 2005-03-18 08:47:00 · 12399 阅读 · 1 评论 -
oracle常用函数
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/toc.htmSQL中的单记录函数1.ASCII返回与指定的字符对应的十进制数;SQL> select ascii(A) A,ascii(a) a,ascii(0) zero,ascii( ) space from dual; A原创 2005-03-29 19:53:00 · 837 阅读 · 0 评论 -
18位身份证标准及验证
18位身份证标准在国家质量技术监督局于1999年7月1日实施的GB11643-1999《公民身份号码》中做了明确的规定。 GB11643-1999《公民身份号码》为GB11643-1989《社会保障号码》的修订版,其中指出将原标准名称"社会保障号码"更名为"公民身份号码",另外GB11643-1999《公民身份号码》从实施之日起代替GB11643-1989。GB11643-1999《公民身份号码》原创 2004-11-23 08:51:00 · 1709 阅读 · 0 评论 -
.net下的数据库备份与还原
数据库:SQL Server ;引用SQLDMO◆数据备份 : /// /// 备份数据库 /// private void btnBackUp_Click(object sender, System.EventArgs e) { this.Cursor = Cursors.WaitCursor; this.label1.Text = " 正在进行档案库的数据备份,这原创 2004-11-18 09:06:00 · 1026 阅读 · 0 评论 -
用C#给程序加启动画面并只允许一个应用程序实例运行
涉及类:1、 启动画面类: public class SplashForm : System.Windows.Forms.Form { private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label1;原创 2004-11-15 16:46:00 · 774 阅读 · 0 评论 -
利用DataSet同时处理多表
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;namespace MstDetail{ /// /// Form1 的摘原创 2004-10-10 10:53:00 · 1285 阅读 · 0 评论 -
存储图片(C#+Winform+SQL Server)
把图片读到pictureBox,再写入数据库SqlConnection conn=new SqlConnection(@"data source=chenyuming2004/VSdotNET;uid=sa;pwd=cym;database=lhf");conn.Open();SqlCommand cmd=new SqlCommand("insert into fuser values (1原创 2004-10-11 10:16:00 · 1359 阅读 · 0 评论 -
Delegate(Event) Sample
using System;namespace CSharpConsole{ public class 场景 { [STAThread] public static void Main(string[] args) { Console.WriteLine("场景开始了...."); // 生成小王 小王 w = new 小王(); // 生成小账 小张 z = new 小张原创 2004-10-14 17:21:00 · 818 阅读 · 0 评论 -
在Web应用程序中执行计划任务(多线程)
在业务复杂的应用程序中,有时候会要求一个或者多个任务在一定的时间或者一定的时间间隔内计划进行,比如定时备份或同步数据库,定时发送电子邮件等,我们称之为计划任务。实现计划任务的方法也有很多,可以采用SQLAgent执行存储过程来实现,也可以采用Windows任务调度程序来实现,也可以使用Windows服务来完成我们的计划任务,这些方法都是很好的解决方案。但是,对于Web应用程序来说,这些方法实现起来原创 2004-10-27 09:40:00 · 631 阅读 · 0 评论 -
Server Timers, Windows Timers, and Thread Timers的对比
Server Timers提供了一种定时执行常规操作的机制,例如:有个关键的服务需要7*24Hours/Week,那就可以创建使用Timer的检查程序,定时的检查该关键服务启动,如果没有启动,检查程序就重新启动该关键服务,并通知系统管理员注意:Server Timers的间隔最小单位是豪秒Server Timers, Windows Timers, and Thread Timers在DotNet原创 2004-10-27 11:07:00 · 1119 阅读 · 0 评论 -
A Generic Data Access Component using Factory Pattern
using System;using System.Reflection;using System.Data;using System.Data.OleDb;using System.Data.SqlClient;namespace CSharpCorner.ProviderFactory{/// /// The collection of ADO.NET data providers that原创 2004-10-23 14:21:00 · 803 阅读 · 0 评论 -
DataGridColumnStyle
在 DataGridColumnStyle 的单元格中使用 DateTimePicker、ComboBox、NumericUpDown 等控件 下载包括:DataGridComboBoxColumnStyle (下载自http://windowsforms.net/TrackViews.aspx?ID=131&Type=Samples&Redir=%2fSamples%2fdownload.a原创 2004-11-05 09:58:00 · 820 阅读 · 0 评论 -
c#中的套打
// Version 2.2// C#// Accept control other than a Form// You can add your own print functions for specific controls and for report title formatting// Controls can expand// Expendable TextBox multiline原创 2004-11-12 16:19:00 · 2619 阅读 · 0 评论 -
Visual Studio "Whidbey"的对象空间初识
探索了.Net环境下的对象/关系映射框架—对象空间的特性原作:Dino EspositoWintellectFebruary 2004翻译:刘海东2004-9-20 适用于: Microsoft® Visual Studio® code-named "Whidbey" Microsoft® ADO.NET Microsoft® SQL Server™原创 2004-11-13 17:37:00 · 679 阅读 · 0 评论 -
C#如何获得cpu,硬盘的物理序列号
using System;using System.Runtime.InteropServices;using System.Management;namespace Hardware{ /// /// Hardware_Mac 的摘要说明。 /// public class HardwareInfo { //取机器名 public string GetHostName() {原创 2004-11-13 17:40:00 · 815 阅读 · 0 评论 -
javascript 常用代码大全
//打开模式对话框 function doSelectUser(txtId) { strFeatures="dialogWidth=500px;dialogHeight=360px;center=yes;middle=yes ;help=no;status=no;scroll=no"; var url,strReturn; url="selUser.aspx原创 2005-04-30 16:06:00 · 1433 阅读 · 0 评论