50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.CoreV35.DataAccess;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using Payroll.BO;
|
|||
|
|
|||
|
namespace Payroll.Service
|
|||
|
{
|
|||
|
[Serializable]
|
|||
|
internal static class BudgetGradeDA
|
|||
|
{
|
|||
|
public static IDataReader Get(TransactionContext tc, ID nID)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("Select * from BudgetGrade where BudgetGradeID=%n", nID.Integer);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public static IDataReader Get(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("Select * from BudgetGrade");
|
|||
|
}
|
|||
|
public static IDataReader Get(TransactionContext tc,int nID)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("Select * from BudgetGrade where BudgetID=%n",nID);
|
|||
|
}
|
|||
|
|
|||
|
public static void Insert(TransactionContext tc, BudgetGrade item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("Insert into BudgetGrade(BudgetGradeID,BudgetID,ChangedPercentage,FixedAmount,GradeID) Values" +
|
|||
|
"(%n,%n,%n,%n,%n)", item.ID.Integer, item.BudgetID.Integer, item.ChangedPercentage, item.FixedAmount, item.GradeID.Integer);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public static void Update(TransactionContext tc, BudgetGrade item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("Update BudgetGrade SET BudgetID=%n,ChangedPercentage=%n,FixedAmount=%n,GradeID=%n" +
|
|||
|
"Where BudgetGradeID=%n", item.BudgetID.Integer, item.ChangedPercentage, item.FixedAmount, item.GradeID.Integer,item.ID.Integer);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public static void Delete(TransactionContext tc, ID nID)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("Delete from BudgetGrade where BudgetGradeID=%n", nID.Integer);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|