c#
文章平均质量分 74
malongning
软件开发、系统分析、架构设计、公司高级主管、老总
展开
-
Visual C#常用函数和方法集汇总
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4转载 2007-01-11 10:25:00 · 530 阅读 · 0 评论 -
使用OWC显示图例
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.Office.Interop.Owc11;nam原创 2007-04-22 17:54:00 · 932 阅读 · 0 评论 -
字符串组排序
实现如下效果,将字符串组排序:dad,bood,bada,Admin,Good,aete,cc,Ko,Beta,Could排序后为:Admin,aete,Beta,bada,bood,Could,cc,dad,Good,Ko排序思路:字符串采用冒泡排序法,字符串与字符串的比较使用函数campareStr(string str1,string str2),返回1,就交字符串换位置字符串比较思路:将字原创 2009-09-25 16:55:00 · 764 阅读 · 0 评论 -
VS2003 无法启动调试解决
1、在命令行中尝试重新注册mscordbi.dll(regsvr32 mscordbi.dll)文件,该文件位于(C:/WINNT/Microsoft.NET/Framework/v1.1.4322请找到你本机的这个对应的目录)。2、在命令行中尝试重新注册oleaut32.dll(regsvr32 oleaut32.dll)3、运行C:/Program Files/Common Files/Mic原创 2010-03-30 16:01:00 · 973 阅读 · 0 评论 -
用C#制作PDF文件全攻略(转)
用C#制作PDF文件全攻略(转)StreamWriter pPDF=new StreamWriter(filePath); ArrayList xRefs=new ArrayList(); float yPos =0f; long streamSt转载 2011-08-03 13:50:34 · 682 阅读 · 0 评论 -
win7 vs.net2003 调试webservice 无法单步执行
现有项目是用vs.net2003开发,客户端是winform,服务端是webservice,两个项目在一个解决方案中。原来用的是win2003,可以在解决方案中单步执行程序调试,遇到webservice方法也可直接跟踪到webservice代码中,现在换成win7系统,就无法单步原创 2011-08-11 13:42:53 · 1110 阅读 · 0 评论 -
资源文件使用总结一
//在这里,我来总结一下关于资源文件的相关操作。//1.比较常见的有获取资源文件对应的文件流,然后转换到相对应的文件//比较典型的做法是通过代码程序集加载指定资源//如下通过Assembly的静态方法GetExecutingAssembly()得到程序集//还有很转载 2011-08-15 20:59:26 · 491 阅读 · 0 评论 -
编译自己的资源文件编辑器(reseditor.exe)
VS.net2003本身带了一个资源文件编辑软件,但默认没有编绎,不能使用。下面是我编绎这个工具的过程: http://www.mscto.com 1.找到reseditor这个目录。一般在“ProgramFiles\MicrosoftVisualStudio.net转载 2011-08-15 20:30:18 · 1851 阅读 · 0 评论 -
Nhibernate 数据操作封装类 可以执行hql 原生sql 返回DataSet
public class SessionManager { # region 当前单实例 private readonly static SessionManager instance = new SessionManager(); /// /// 当前实例 /// public stat原创 2012-12-19 11:18:12 · 1927 阅读 · 0 评论 -
C#使用摄像头拍照
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Runtime.InteropServices;using System.Draw原创 2007-01-16 16:09:00 · 4967 阅读 · 11 评论 -
向数据库中添加图片,显示图片
在窗体上显示从数据库中读出的图片:b=(byte[])ds.Tables[0].Rows[position-1]["CustomerPhoto"];MemoryStream stream = new MemoryStream(b, true); stream.Write(b, 0, b.Length); System.Drawing.Bitmap bitmap=new Bitm原创 2007-04-16 09:15:00 · 2686 阅读 · 0 评论 -
加密、解密
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using原创 2007-04-16 09:23:00 · 620 阅读 · 0 评论 -
asp.net 图片验证码
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.We原创 2007-04-16 09:18:00 · 646 阅读 · 0 评论 -
c#导出数据到Excel
1、filename是导出的文件名//导出数据到Excel表 public void ExportExcel(DataSet my_Ds, string filename) { //DataSet ds = this.SqlDataSource1; Excel.Application oExcel; oExcel = new Excel原创 2007-01-09 09:51:00 · 1876 阅读 · 0 评论 -
操作word
首先引入类库,Microsoft.Office.Interop.Word,然后进行编程。代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text转载 2007-01-12 10:26:00 · 886 阅读 · 0 评论 -
asp.net使用摄像头拍照
视频拍照的flash文件import it.sephiroth.mloaderWindowimport it.sephiroth.PrintScreenmyCam = Camera.get();myCam.setMode(390, 290, 10);my_video.attachVideo(myCam);var loader:mloaderWindow = this.createClass原创 2007-01-16 16:25:00 · 5141 阅读 · 1 评论 -
将DBF,XLS,XML,MDB文件导入C#DataGrid的方法,
以下的源码里分别给出了将DBF,XLS,XML,MDB文件导入C#DataGrid的方法,供各位参考。 //PutInDataSet.cs的源码 using System; using System.Data.Odbc; using System.Data.OleDb; using System.Data; using System.Collections; namespace PutInData转载 2007-01-25 09:12:00 · 848 阅读 · 0 评论 -
asp.net (c#)检测sql注入的类
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using原创 2007-01-25 09:54:00 · 1868 阅读 · 0 评论 -
.net中连接数据库的几种方法(vb.net)
一、先介绍ADO.NET和ODBC.NETADO .NET由Microsoft ActiveX Data Objects (ADO)改进而来,它提供平台互用和可收缩的数据访问功能,是Visual Basic.NET进行数据库编程所使用的重要工具。ADO.NET 使用了某些 ADO 的对象,如 Connection 和 Command 对象,并且还引入了新的对象。主要的新 ADO.NET 对象包括转载 2007-01-25 10:04:00 · 2640 阅读 · 0 评论 -
自己写的数据访问层(使用ini文件加密存储sql数据库登陆信息)
数据访问类:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebPart原创 2007-01-25 09:52:00 · 1515 阅读 · 0 评论 -
使用AxMSChart20Lib.AxMSChart显示图表
public void print() { string sql="select lie2 from xtsd where lie1=xsbg"; ds.Clear(); ds=objbase.ExecSelect(sql,"xtsd"); if(ds.Tables[0].Rows.Count>0) { this.Txt_xsbg.Text=ds.Tables[0]原创 2007-03-26 15:08:00 · 4957 阅读 · 0 评论 -
计算机英语
转贴:http://community.csdn.net/Expert/topic/5461/5461225.xml?temp=.18320861 简单的计算机英语 CPU(Center Processor Unit)中央处理单元 mainboard主板 RAM(random access memory)随机存储器(内存) ROM(Read Only Memory)只读存储器 Floppy D转载 2007-04-13 15:36:00 · 929 阅读 · 0 评论 -
asp.net 新闻发布多附件上传
使用 input file 实现多附件上传,注意form中必须添加 enctype="multipart/form-data" method="post"原创 2013-11-08 22:06:59 · 990 阅读 · 0 评论