摘要:public void sendFax(string faxFile, string faxNumber, string hostName) { //writeFile("sendFax faxFile= "+faxFile); string sql = ""; string faxID = ""; FileInfo f = new FileInfo(faxFile); if (f.Exists)...
阅读全文
摘要: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 取当前日 int 日=curre...
阅读全文
摘要:在开发网站的时候我们常常会用到一些配置文件,在.Net2.0下面微软给我们提供了一个ConfigurationManager这样一个类来管理存储于配置文件中的信息,这样我们将配置项写在web.config文件的AppSettings这一节里面就可以使用键值直接来访问它了.就象这样System.Configuration.ConfigurationManager.AppSettings["MyNam...
阅读全文
摘要:验证输入的正确性public static bool isEmail(string inputEmail){inputEmail = NulltoString(inputEmail);string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a...
阅读全文
摘要:1、使用outLook提供的发送 如:我见过的用友软件U8生产制造(演示版),其中的邮件功能就是通过调用outLook的ActiveX组件 优点:开发简单 缺点:依赖outlook组件,SMTP邮件服务 邮件发送的代码如下:以下是引用片段:PrivateSubSend() DimoutObjAsNewOutlook.Application() DimItemAsOutlook.Mail...
阅读全文
摘要:from: http://51xingfu.blog.51cto.com/219185/46222 日期转化一 为了达到不同的显示效果有时,我们需要对时间进行转化,默认格式为:2007-01-03 14:33:34 ,要转化为其他格式,要用到DateTime.ToString的方法(String, IFormatProvider),如下所示: using System; using Syst...
阅读全文