using HRM.BO; using Ease.Core.DataAccess; using System; using System.Data; namespace HRM.DA { public class ErCVReferenceDA { internal static void Insert(ErCVReference exprItem, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"INSERT INTO ERCVREFERENCE ( CVReferenceID, Name, Occupation, Relation, Address, Email, Telephone, Mobile, CVID ) VALUES ( %n, %s, %s, %s, %s, %s, %s, %s, %n ) ", exprItem.ID, exprItem.Name, exprItem.Occupation, exprItem.Relation, exprItem.Address, exprItem.Email, exprItem.Telephone, exprItem.Mobile, exprItem.CVID); tc.ExecuteNonQuery(sql); } internal static void UpdateExperience(CVReference exprItem, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"UPDATE ERCVREFERENCE SET Name = %s, Occupation = %s, Relation = %s, Address = %s, Email = %s, Telephone = %s, Mobile = %s, CVID = %n WHERE CVExperienceID = %n ", exprItem.Name, exprItem.Occupation, exprItem.Relation, exprItem.Address, exprItem.Email, exprItem.Telephone, exprItem.Mobile, exprItem.CVID, exprItem.ID); tc.ExecuteNonQuery(sql); } internal static void Delete(int iD, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Delete From ERCVREFERENCE Where CVID = %n", iD); tc.ExecuteNonQuery(sql); } internal static void DeleteByCvId(int oID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Delete From ERCVREFERENCE Where CVID = %n", oID); tc.ExecuteNonQuery(sql); } internal static IDataReader Get(object cVID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"SELECT * FROM ERCVREFERENCE WHERE CVID = %n", cVID); return tc.ExecuteReader(sql); } } }