04 2013 档案
摘要:public GetQuotationbyIdJson GetQuotationbyId(string quotationid) { GetQuotationbyIdJson json = null; StringBuilder sqlstr = new StringBuilder(); ArrayList list=new ArrayList(); sqlstr.Append("select qp.SellerId,qp.QuotationId,qp.BookNo,q...
阅读全文
摘要:/ //****************2013-04-12********************// //这种方法在服务器端保存图片存在权限问题,已废弃//// /// <summary> // /// 字节流转换成图片 // /// </summary> // /// <param name="byt">要转换的字节流</param> // /// <returns>转换得到的Image对象</returns> // public System.Drawing.Image BytesToImg..
阅读全文
摘要:首先,File类是个静态类,无法实例化。它的命名空间是:using System.IO File中基本的方法如下演示:图一、File.Create图二、File.Copy一般情况图三、File.Copy(path,path1,true);图四、File.Delete图五、File.Exists();图六、File.Move图七、File.ReadAllLines()图八、ReadAllText和ReadAllLines的区别图九、一道简单的练习题图十、File.Replace图十一、File.WriteAllLines()图十二、File.WriteAllText( )图十三、File.Ap.
阅读全文
摘要:using System;using System.IO;using System.Drawing;using System.Windows.Forms;using System.Drawing.Imaging;public class ImageConvert{ //主要通过Stream作为中间桥梁 public static Image ByteArrayToImage(byte[] iamgebytes) { MemoryStream ms = new MemoryStream(iamgebytes); Image image = ...
阅读全文
摘要:C#中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别// 获取程序的基目录。System.AppDomain.CurrentDomain.BaseDirectory// 获取模块的完整路径。System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。System.Environment.CurrentDirectory// 获取应用程序的当前工作目录。System.IO.Dire
阅读全文
摘要:{0:yyyy-MM-dd HH:mm:ss.fff}:使用24小时制格式化日期{0:yyyy-MM-dd hh:mm:ss.fff}:使用12小时制格式化日期以下同理,从左至右分别为-年-月-日 时:分:秒.毫秒{0:yyyy-MM-dd HH:mm:ss zzz}{0:yyyy-MM-dd HH:mm:ss.ff zzz}{0:yyyy-MM-dd HH:mm:ss.fff zzz}{0:yyyy-MM-dd HH:mm:ss.ffff zzz}以下测试代码//---假设时间为-2009-03-17 16:50:49.92object objValue2 = Business.Servic
阅读全文