using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core.DataAccess; using Ease.Core.Model; using HRM.BO; namespace HRM.DA { public class ReferredByDA { internal static void InsertReferredBy(ReferredBy refItem, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Insert Into CVReferredBy(ReferredByID,CvId,Name,OtherDetail,ReferredBy,EmployeeNo) Values(%n,%n,%s,%s,%n,%s)", refItem.ID, refItem.CvId, refItem.Name, refItem.OtherDetail, refItem.ReferredBY, refItem.EmployeeNo); tc.ExecuteNonQuery(sql); } internal static void UpdateReferredBy(ReferredBy refItem, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Update CVReferredBy Set CvId = %n,Name = %s,OtherDetail = %s,ReferredBy = %n,EmployeeNo = %s Where ReferredByID = %n", refItem.CvId, refItem.Name, refItem.OtherDetail, refItem.ReferredBY, refItem.EmployeeNo, refItem.ID); tc.ExecuteNonQuery(sql); } internal static void Delete(int iD, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where ReferredByID = %n", iD); tc.ExecuteNonQuery(sql); } internal static void DeleteByCvId(int oID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where CvId = %n", oID); tc.ExecuteNonQuery(sql); } } }