using HRM.BO; using Ease.Core.DataAccess; using System; using System.Data; namespace HRM.DA { public class MemberWiseMarkDA { internal static IDataReader Get(int stepID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Select * From RECRUITEMENTMEMBERWISEMARK Where StepId = %n ", stepID); return tc.ExecuteReader(sql); } internal static IDataReader GetmemberWiseMarkBySessionID(int SessionID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Select * From RECRUITEMENTMEMBERWISEMARK Where InterviewSessionID = %n ", SessionID); return tc.ExecuteReader(sql); } internal static void Insert(MemberWiseMark item, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Insert Into RECRUITEMENTMEMBERWISEMARK(MemberWiseMarkID,ProcessId,StepId,EmployeeId,CandidateId,Marks,isEmployee, InterviewSessionID) Values(%n,%n,%n,%n,%n,%n,%n,%n)", item.ID, item.ProcessId, item.StepId, item.EmployeeId, item.CandidateId, item.Marks, Convert.ToInt32(item.IsEmployee), item.InterveiwSessionID); tc.ExecuteNonQuery(sql); } internal static void Update(MemberWiseMark item, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Update RECRUITEMENTMEMBERWISEMARK set Marks=%n where CandidateId=%n and InterviewSessionID =%n", item.Marks, item.CandidateId, item.InterveiwSessionID); tc.ExecuteNonQuery(sql); } internal static void Delete(int InterviewSessionID, TransactionContext tc) { string sql = SQLParser.MakeSQL(@"Delete From RECRUITEMENTMEMBERWISEMARK Where InterviewSessionID = %n ", InterviewSessionID); tc.ExecuteNonQuery(sql); } internal static void Delete(int procssID, int stepID, int memberID, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Delete From RECRUITEMENTMEMBERWISEMARK Where ProcessId = %n And StepId = %n And EmployeeId = %n", procssID, stepID, memberID); tc.ExecuteNonQuery(sql); } internal static void Delete(int processID, int canID, bool isEmployee, TransactionContext tc) { string sql = SQLParser.MakeSQL( @"Delete From RECRUITEMENTMEMBERWISEMARK Where ProcessId = %n And CandidateId = %n And isEmployee = %n", processID, canID, Convert.ToInt32(isEmployee)); tc.ExecuteNonQuery(sql); } } }