using System; using Ease.Core.Model; using Ease.Core.DataAccess; using HRM.BO; using Ease.Core.Utility; using System.Collections.Generic; using System.Data; namespace HRM.DA { internal class TaxHeadAssignmentDA { #region Constructor private TaxHeadAssignmentDA() { } #endregion #region Insert function internal static void Insert(TransactionContext tc, TaxHeadAssignment item) { tc.ExecuteNonQuery( "INSERT INTO INCOMETAXHEAD(HeadID, description, deductPercent, CreatedBy, CreationDate, SequenceNo, Status)" + " VALUES(%n, %s, %n, %n, %d, %n, %n)", item.ID, item.Description, item.DeductPercent, item.CreatedBy, DataReader.GetNullValue(item.CreatedDate), item.Sequence, item.Status); } #endregion #region Update function internal static void Update(TransactionContext tc, TaxHeadAssignment item) { tc.ExecuteNonQuery( "UPDATE INCOMETAXHEAD SET description=%s, deductPercent=%n, ModifiedBy=%n, ModifiedDate=%d, SequenceNo=%n, Status=%n" + " WHERE HeadID=%n", item.Description, item.DeductPercent, item.ModifiedBy, item.ModifiedDate, item.Sequence, item.Status, item.ID); } #endregion #region Get Function internal static IDataReader Get(TransactionContext tc) { return tc.ExecuteReader("SELECT * FROM INCOMETAXHEAD"); } internal static IDataReader Get(TransactionContext tc, int nID) { return tc.ExecuteReader("SELECT * FROM INCOMETAXHEAD WHERE HeadID=%n", nID); } #endregion #region Delete function internal static void Delete(TransactionContext tc, int nID) { tc.ExecuteNonQuery("DELETE FROM INCOMETAXHEAD WHERE HeadID=%n", nID); } #endregion } }