EchoTex_Payroll/HRM.DA/DA/SearchTools/QTColumnDA.cs
2024-10-14 10:01:49 +06:00

37 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using Ease.Core.DataAccess;
using HRM.BO.SearchTools;
namespace HRM.DA.DA.SearchTools
{
internal class QTColumnDA
{
public QTColumnDA()
{
}
internal static void Insert(TransactionContext tc, QTColumn item)
{
string sql = SQLParser.MakeSQL(
@"INSERT INTO QTColumn (QTColumnID, QueryToolID, ColumnID, Alignment, Aggregate, Format, Caption)
VALUES (%n, %n, %n, %n, %s, %s, %s)", item.ID, item.QueryToolID, item.ColumnID, item.Alignment,
item.Aggregate, item.Format, item.Caption);
tc.ExecuteNonQuery(sql);
}
internal static void Update(TransactionContext tc, QTColumn item)
{
string sql = SQLParser.MakeSQL(@"UPDATE dbo.QTColumn
SET QueryToolID = %n,
ColumnID = %n,
Alignment = %n,
Aggregate = %s,
Format = %s,
Caption = %s
WHERE QTColumnID = %n", item.QueryToolID, item.ColumnID, item.Alignment,
item.Aggregate, item.Format, item.Caption, item.ID);
}
}
}