資源簡介
C#調用Codesoft打印,利用Codesoft生成一個模版,C#通過賦值并條用打印機打印

代碼片段和文件信息
using?System;
namespace?PatriotLab
{
????///?
????///?dbCon?的摘要說明。
????///?
????public?class?dbCon
????{
????????public?static?Rtdmes.DBAccess.DbAccess?CreateDB()
????????{
????????????return?conDb(“ADMIN“);
????????}
????????public?static?Rtdmes.DBAccess.DbAccess?CreateDB(string?UserNo)
????????{
????????????return?conDb(UserNo);
????????}
????????private?static?Rtdmes.DBAccess.DbAccess?conDb(string?UserNo)
????????{
????????????string?Database?=?System.Configuration.ConfigurationSettings.AppSettings[“Database“].ToString();
????????????string?DBType?=?System.Configuration.ConfigurationSettings.AppSettings[“DBType“].ToString();
????????????string?Password?=?System.Configuration.ConfigurationSettings.AppSettings[“Password“].ToString();
????????????string?Server?=?System.Configuration.ConfigurationSettings.AppSettings[“Server“].ToString();
????????????string?Username?=?System.Configuration.ConfigurationSettings.AppSettings[“Username“].ToString();
????????????string?connectioning?=?““;
????????????Rtdmes.framework.TagDBType?dbtype?=?Rtdmes.framework.TagDBType.Oracle;
????????????switch?(DBType.ToLower())
????????????{
????????????????case?“oracle“:
????????????????????connectioning?=?“user?id=“?+?Username?+?“;data?source=“?+?Server?+?“;password=“?+?Password?+?“;Connection?Lifetime?=?5;Pooling=true;Max?Pool?Size?=100;Min?Pool?Size=10“;
????????????????????dbtype?=?Rtdmes.framework.TagDBType.Oracle;
????????????????????break;
????????????????case?“sqlserver“:
????????????????????connectioning?=?“server=“?+?Server?+?“;uid=“?+?Username?+?“;pwd=“?+?Password?+?“;database=“?+?Database?+?“;?connection?reset=false;?connection?lifetime=5;?enlist=true;Max?Pool?Size=100;Pooling=true“;
????????????????????dbtype?=?Rtdmes.framework.TagDBType.SqlServer;
????????????????????break;
????????????????case?“oledb“:
????????????????????connectioning?=?““;
????????????????????dbtype?=?Rtdmes.framework.TagDBType.OleDB;
????????????????????break;
????????????}
????????????Rtdmes.DBAccess.DbAccess?odb?=?null;
????????????//RTDMes.framework.LoginUser?login?=?new?RTDMes.framework.LoginUser(Server?Database?Username?Password);
????????????Rtdmes.framework.UserInfo?login?=?new?Rtdmes.framework.UserInfo(Server?Database?Username?Password?DBType);
????????????login.UserNo?=?“ADMIN“;
????????????//login.UserOrg?=?““;
????????????odb?=?Rtdmes.DBAccess.DbAccess.CreateDB(connectioning?dbtype);
????????????//odb.loginUser?=?login;
????????????odb.UserInfo?=?login;
????????????return?odb;
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????45568??2009-12-12?15:42??打印系統\LUKE.Lab
?????文件???????3774??2009-02-05?17:35??打印系統\PrinterDemo\6SIGMA.ico
?????文件????????299??2010-03-28?12:03??打印系統\PrinterDemo\App.config
?????文件??????????2??2009-02-05?10:54??打印系統\PrinterDemo\bin\Debug\20090205.txt
?????文件??????????0??2009-02-05?10:26??打印系統\PrinterDemo\bin\Debug\200925.txt
?????文件???????3774??1997-09-06?14:28??打印系統\PrinterDemo\bin\Debug\6SIGMA.ico
?????文件??????13312??2009-02-23?09:06??打印系統\PrinterDemo\bin\Debug\AxInterop.BARCODEXLib.dll
?????文件?????868352??2005-12-02?20:02??打印系統\PrinterDemo\bin\Debug\barcodex.ocx
?????文件??????28672??2008-05-21?14:02??打印系統\PrinterDemo\bin\Debug\ClientLibrary.dll
?????文件?????184320??2008-05-21?14:02??打印系統\PrinterDemo\bin\Debug\ClientPBForms.dll
?????文件????????509??2009-02-09?16:23??打印系統\PrinterDemo\bin\Debug\Data\20090209.txt
?????文件????????348??2009-02-10?15:18??打印系統\PrinterDemo\bin\Debug\Data\20090210.txt
?????文件????????266??2009-12-12?15:57??打印系統\PrinterDemo\bin\Debug\Data\20091212.txt
?????目錄??????????0??2010-03-28?11:23??打印系統\PrinterDemo\bin\Debug\Data
?????文件??????69632??2008-05-21?14:02??打印系統\PrinterDemo\bin\Debug\DBAccess.dll
?????文件??????49152??2010-03-28?13:57??打印系統\PrinterDemo\bin\Debug\Demo.bak
?????文件??????24576??2010-03-28?13:57??打印系統\PrinterDemo\bin\Debug\Demo.Lab
?????文件?????110592??2008-05-21?14:02??打印系統\PrinterDemo\bin\Debug\fr
?????文件??????28672??2009-02-23?09:06??打印系統\PrinterDemo\bin\Debug\Interop.BARCODEXLib.dll
?????文件????1093632??2008-01-22?19:54??打印系統\PrinterDemo\bin\Debug\Interop.Excel.dll
?????文件??????86016??2009-02-23?09:06??打印系統\PrinterDemo\bin\Debug\Interop.LabelManager2.dll
?????文件??????57344??2008-01-22?19:54??打印系統\PrinterDemo\bin\Debug\Interop.VBIDE.dll
?????文件????????209??2010-03-30?14:17??打印系統\PrinterDemo\bin\Debug\ipConfig.xm
?????文件????????748??2009-12-22?09:20??打印系統\PrinterDemo\bin\Debug\LabSet.xm
?????文件????????622??2009-12-22?09:48??打印系統\PrinterDemo\bin\Debug\LenSet.xm
?????文件?????????84??2009-12-16?19:04??打印系統\PrinterDemo\bin\Debug\lenUserSet.xm
?????文件????????156??2009-02-09?15:28??打印系統\PrinterDemo\bin\Debug\LogErr\20090209.txt
?????文件????????216??2009-02-10?15:16??打印系統\PrinterDemo\bin\Debug\LogErr\20090210.txt
?????文件?????????41??2009-12-12?13:55??打印系統\PrinterDemo\bin\Debug\LogErr\20091212.txt
?????目錄??????????0??2010-03-28?11:23??打印系統\PrinterDemo\bin\Debug\LogErr
............此處省略98個文件信息
- 上一篇:asp web c# 留言板 系統
- 下一篇:WPF磨砂蒙版效果
評論
共有 條評論