CEL_Payroll/Payroll.Service/Budget/DA/BudgetNewJoinerDA.cs

68 lines
3.0 KiB
C#
Raw Permalink Normal View History

2024-09-17 14:30:13 +06:00
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 BudgetNewJoinerDA
{
public static IDataReader Get(TransactionContext tc, ID nID)
{
return tc.ExecuteReader("Select * from BudgetNewJoiner where BudgetNewJoinerID=%n", nID.Integer);
}
public static IDataReader Get(TransactionContext tc)
{
return tc.ExecuteReader("Select * from BudgetNewJoiner");
}
public static IDataReader Get(TransactionContext tc,int nID)
{
return tc.ExecuteReader("Select * from BudgetNewJoiner where BudgetID=%n", nID);
}
public static void Insert(TransactionContext tc, BudgetNewJoiner item)
{
tc.ExecuteNonQuery("Insert into BudgetNewJoiner(BudgetNewJoinerID,BasicSalary,BudgetID,DepartmentID,GradeID,IncrementPercentage,LocationID,NextIncrementalMonth,NoofEmployee,FromDate,CategoryID,GrossSalary) Values" +
"(%n,%n,%n,%n,%n,%n,%n,%n,%n,%d,%n,%n)", item.ID.Integer,item.BasicSalary,item.BudgetID.Integer,item.DepartmentID.Integer,item.GradeID.Integer,item.IncrementPercentage,item.LocationID.Integer,item.NextIncrementalMonth,item.NoofEmployee,item.FromDate,item.CategoryID.Integer,item.GrossSalary);
}
public static void Update(TransactionContext tc, BudgetNewJoiner item)
{
tc.ExecuteNonQuery("Update BudgetNewJoiner SET BasicSalary=%n,BudgetID=%n,DepartmentID=%n,GradeID=%n,IncrementPercentage=%n,LocationID=%n,NextIncrementalMonth=%n,NoofEmployee=%n,FromDate=%d,CategoryID=%n,GrossSalary=%n" +
"Where BudgetNewJoinerID=%n", item.BasicSalary, item.BudgetID.Integer, item.DepartmentID.Integer, item.GradeID.Integer, item.IncrementPercentage, item.LocationID.Integer, item.NextIncrementalMonth, item.NoofEmployee, item.FromDate, item.CategoryID, item.GrossSalary, item.ID.Integer);
}
public static void Delete(TransactionContext tc, ID nID)
{
tc.ExecuteNonQuery("Delete from BudgetNewJoiner where BudgetNewJoinerID=%n", nID.Integer);
}
public static IDataReader GetBudgetNewJoinerCrGs(TransactionContext tc, ID baseID)
{
return tc.ExecuteReader("Select * from BudgetNewJoinerCrG Where BudgetNewJoinerID=%n",baseID.Integer);
}
public static void Delete(TransactionContext tc, string tableName, string columnName, ID id)
{
tc.ExecuteNonQuery("Delete from %s where %s=%n", tableName, columnName, id.Integer);
}
public static void Insert(TransactionContext tc, BudgetNewJoinerCrG item)
{
tc.ExecuteNonQuery("Insert into BudgetNewJoinerCrG(BudgetNewJoinerCrGID,BudgetNewJoinerID,CCID,Percentage) Values" +
"(%n,%n,%n,%n)", item.ID.Integer, item.BudgetNewJoinerID.Integer, item.CCID.Integer,item.Percentage );
}
}
}