chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Data.Common;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Wellan.Data;
|
||||
using Wellan.Common;
|
||||
using System.Transactions;
|
||||
using System.ComponentModel;
|
||||
|
||||
/// <summary>
|
||||
/// RlogDAC 的摘要描述
|
||||
/// </summary>
|
||||
public class RlogDAC : Wellan.Data.WDAC
|
||||
{
|
||||
//private string _select =
|
||||
// @" SELECT RLDAT, RLTIM, RLUSR, RLPRG, RLCIP, RLCNT, TRDAT, TRMOD, TRUSR FROM RLOG ";
|
||||
|
||||
private string _insert =
|
||||
@"INSERT INTO RLOG
|
||||
(RLDAT, RLTIM, RLUSR, RLPRG, RLCIP, RLCNT, TRDAT, TRMOD, TRUSR)
|
||||
VALUES
|
||||
(@RLDAT, @RLTIM, @RLUSR, @RLPRG, @RLCIP, @RLCNT, GETDATE(), 'INSERT', @TRUSR)";
|
||||
|
||||
public RlogDAC()
|
||||
{
|
||||
}
|
||||
|
||||
public RlogDAC(WQuery query)
|
||||
: this()
|
||||
{
|
||||
this._query = query;
|
||||
}
|
||||
|
||||
public RlogDAC(string connectionConfig, string connectionConfigName)
|
||||
: this()
|
||||
{
|
||||
this._connectionConfig = connectionConfig;
|
||||
this._connectionConfigName = connectionConfigName;
|
||||
}
|
||||
|
||||
public void InsertOne(string RLUSR, string RLPRG, string RLCIP, string RLCNT)
|
||||
{
|
||||
DbCommand cmdInsert = Query.NewCommand(_insert);
|
||||
Query.AddParam(cmdInsert, "RLDAT", DateTime.UtcNow.AddHours(8).Date);
|
||||
Query.AddParam(cmdInsert, "RLTIM", DateTime.UtcNow.AddHours(8).ToString("HH:mm:ss"));
|
||||
Query.AddParam(cmdInsert, "RLUSR", RLUSR);
|
||||
Query.AddParam(cmdInsert, "RLPRG", RLPRG);
|
||||
Query.AddParam(cmdInsert, "RLCIP", RLCIP);
|
||||
Query.AddParam(cmdInsert, "RLCNT", RLCNT);
|
||||
Query.AddParam(cmdInsert, "TRUSR", RLUSR);
|
||||
Query.ExecuteNonQuery(cmdInsert);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user