文章分类 - Code
摘要:CREATE TABLE #tmp ( ID int IDENTITY (1, 1), 单价 decimal(18, 2) NOT NULL , 进库数量 decimal(18, 0) NOT NULL , 已出数量 decimal(18, 0) NOT NULL ) insert into #tm
阅读全文
摘要:C# code using System;using System.Collections.Generic;using System.Text;using System.Diagnostics;using DotRas;using System.Net;namespace UpLoadTest {public class VPN {private static string WinDir = Environment.GetFolderPath(Environment.SpecialFolder.System);private static string fileName = @"\rasdia
阅读全文
摘要:MethodBuilder mb1 = tb.DefineMethod( "CallA", MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, null, null ); ILGenerator MethodILObj = mb1.GetILGenerator(); //新建一个局部变量,数...
阅读全文
摘要:(最全的数据库连接字符串)connectionstring
阅读全文
摘要:private string ReplaceNotTypeStr(string str) { //排除有可能出错的字符 Regex rex = new Regex("[^\u0021-\u007e^\u4e00-\u9fa5^\uFF00-\uFFFF^\u3001-\u3002^\u3008-\u300b^\u201c-\u201d^\u2018-\u2019^\u2026^\u2...
阅读全文
摘要:private void button1_Click(object sender, EventArgs e) { if (SearchForm(new Form2().Text) == false) { Form2 frm2 = new Form2(); frm2.Show();...
阅读全文
摘要:public static void AutoScale(Form frm) { frm.Tag = frm.Width.ToString() + "," + frm.Height.ToString(); frm.SizeChanged += new EventHandler(frm_SizeChanged); } ...
阅读全文
摘要:通过WSE-Attachment传输文件,参数中有中文,会有乱码,不知如何解决,在这儿记录一下.
阅读全文
摘要:该存储过程使用办公自动化脚本调用Dimac w3 JMail AxtiveX组件来代替Sql Mail发送邮件
阅读全文
摘要:public static string Substr(string input, int start) { if (input == null || Math.Abs(start) > input.Length) { return null; } else if (start input.Length || len < 0) { return ...
阅读全文
摘要:*--比较两个数据库的表结构差异 --*//*--调用示例 exec p_comparestructure 'xzkh_model','xzkh_new'--*/ if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_comparestructure]') and OBJECTPROPERTY(id, N'...
阅读全文
摘要:今天的一个小发现,使用 类似以下的代码,打开一个弹出窗口。function opencustomerwin() { var srcFile = "search_query.aspx?action=customer¶m=&rnd="+Math.random(); //新窗口的文档名称 var winFeatures = "dialogHeight:630...
阅读全文
摘要:/// /// 根据url,得到其html源文件 /// /// /// public static string GetHtmlStr(string url) { StreamReader sr = null; string html = ""; try { WebRequest wrq = WebRequest.Create(url); WebR...
阅读全文
摘要:记录一段代码,未完成版。想法:是根据传为和实体的一些属性转为相应的类型对像,把相应的类型对象转换为对应的实体属性//实体转为对象 public void EntityToMyObject(object objEntity,object myObj) { Type tEntity = objEntity.GetType(); Type tMyObj=myObj.GetType(); ...
阅读全文