摘要:
private static object sign = new object(); public static DBHelper CreateMapping(string connStr = "") { DBHelper db = new D...
阅读全文
posted @ 2013-06-07 14:58
王洪洪
阅读(5955)
推荐(0)
摘要:
#region 导出excel /// /// 把数据插入到Excel表中 /// /// Sql语句 /// sheet名或者表名 /// public void InsertDataToE...
阅读全文
posted @ 2013-06-07 14:57
王洪洪
阅读(188)
推荐(0)
摘要:
c# 写txt public static void WriteErrorLogDataInteraction(string sLog, string titleLog) { try { stri...
阅读全文
posted @ 2013-06-07 14:49
王洪洪
阅读(184)
推荐(0)
摘要:
#region 导出excel /// <summary> /// 把数据插入到Excel表中 /// </summary> /// <param name="sql">Sql语句</param> /// <param name="Tablename">sheet名或者表名</param> /// <returns></returns> public void InsertDataToExcel() { #region Excel进程ID存储 ...
阅读全文
posted @ 2013-05-31 20:52
王洪洪
阅读(546)
推荐(0)
摘要:
private static object sign = new object(); public static DBHelper CreateMapping(string connStr = "") { DBHelper db = new DBHelper(connStr); return db; } /// <summary> /// 增删改的数据库连接字符串 /// </summary> string conString = ""; ...
阅读全文
posted @ 2013-05-31 20:42
王洪洪
阅读(1710)
推荐(0)
摘要:
第一、sql中写事物begin try begin transaction insert into shiwu (asd) values ('aasdasda'); commit transaction end try begin catch select ERROR_NUMBER() as errornumber rollback transaction end catch第二、c#中执行事物SqlParameter[] paras = new SqlParameter[] { }; paras = list.ToArray(); ...
阅读全文
posted @ 2013-05-29 13:41
王洪洪
阅读(451)
推荐(0)
摘要:
第一、创建一个Windows服务第二、在自动生成的Program类中写你要写的代码using System;using System.Collections.Generic;using System.Linq;using System.ServiceProcess;using System.Text;namespace WindowsTest{ static class Program { /// /// 应用程序的主入口点。 /// static void Main() { Servi...
阅读全文
posted @ 2013-05-29 09:36
王洪洪
阅读(299)
推荐(1)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WinInterfaceCallBackVs08{ class Class1 { public Class1() { new Action((s) => { }).BeginInvoke("", null, null); new Action(exSql).BeginInvoke("", null, null); ...
阅读全文
posted @ 2013-05-23 20:42
王洪洪
阅读(686)
推荐(0)
摘要:
/// <summary> /// JSON 的摘要说明。 /// </summary> public class JSON { private static readonly string Json_A = "3A3B1A16-F697-4a32-A0B0-2515BB4692F5"; private static readonly string Json_B = "274BEBC4-2482-4426-9A23-C32D25F7615B"; private static readonly string Json_C = &qu
阅读全文
posted @ 2013-05-14 10:22
王洪洪
阅读(366)
推荐(0)
摘要:
sql 增加数据的例子ALTER trigger createPerson on Personfor insertasbegindeclare @name nchar(10)select @name=name from insertedINSERT INTO PersonCopy(name)VALUES(@name)print '结果为:'+@name--insert into storeInfo(storeID,mID) values((select mID from ))endsql 修改数据时的触发器USE [hh]GO/****** 对象: Trigger [dbo].
阅读全文
posted @ 2013-05-11 18:27
王洪洪
阅读(557)
推荐(0)