private List<string> getVacancyList(string empid, string spName)
    {
        //pass parameters
        IDictionary<string, object> employeeIDParam = new Dictionary<string, object>();
        employeeIDParam.Add("@EmpId", empid);

        //Pass Stored Procedure Name and parameter list.
        DBOperationsUtil dpOperation = new DBOperationsUtil(spName, employeeIDParam);
        return dpOperation.getRecordAsListOfString("vacancy_detail");
    }
    private List<string> getNotProcessedEmployees(Employee employee, string spName)
    {
        //pass parameters
        IDictionary<string, object> employeeIDParam = new Dictionary<string, object>();
        employeeIDParam.Add("@proc_EID", employee.EmpID);

        //Pass Stored Procedure Name and parameter list.
        DBOperationsUtil dpOperation = new DBOperationsUtil(spName, employeeIDParam);
        return dpOperation.getRecordAsListOfString("EID");
    }
 public TransactionResponse getNotEvaluatedApplicantsForSecondPhase(int formType)
 {
     TransactionResponse response = new TransactionResponse();
     try
     {
         //Add List of Arguments for new employee
         IDictionary<string, object> parameters = new Dictionary<string, object>();
         parameters.Add("@vacancy_No", vacanyEvaluationForm.VacancyNo);
         parameters.Add("@vacancy_date", vacanyEvaluationForm.VacancyDate);
         parameters.Add("@formType", formType);
         DBOperationsUtil dpOperation = new DBOperationsUtil(DbAccessConstants.spGetNotEvaluatedApplicantsforSecondPhase, parameters);
         List<string> listOfNotEvaluatedEmployee = dpOperation.getRecordAsListOfString("EID");
         if (listOfNotEvaluatedEmployee != null && listOfNotEvaluatedEmployee.Count > 0)
         {
             //convert list of string to one string seprated by ','
             response.Data = String.Join(", ", listOfNotEvaluatedEmployee.ToArray());
             response.setMessageType(TransactionResponse.SeverityLevel.ERROR);
             response.setMessage(DBOperationErrorConstants.M_VACANCY_COMPLETION_NOT_POSSIBLE);
             response.setErrorCode(DBOperationErrorConstants.E_VACANCY_COMPLETION_NOT_POSSIBLE);
             response.setSuccess(false);
         }
         else
         {
             response.setMessageType(TransactionResponse.SeverityLevel.WARNING);
             response.setMessage(DBOperationErrorConstants.M_VACANCY_COMPLETION_WARNING);
             response.setSuccess(true);
         }
     }
     catch (SqlException ex)
     {
         //Other SqlException is catched
         response.setMessageType(TransactionResponse.SeverityLevel.ERROR);
         response.setMessage(DBOperationErrorConstants.M_UNKNOWN_ERROR_VERIFY_COMPLETE_VANCANCY);
         response.setErrorCode(DBOperationErrorConstants.E_UNKNOWN_ERROR_AT_DB_OOPERATION);
         response.setSuccess(false);
     }
     //CATCH ANY OTHER EXCEPTION, dont let user see any kind of unexpected error
     catch (Exception ex)
     {
         //Write this exception to file for investigation of the issue later.
         logException(ex);
         LoggerManager.upDateWithGenericErrorMessage(response);
     }
     return response;
 }
    private List<String> getListOfEmployeeForResponsibleHROfficer(string spName, string vacancyNo,
        string vacancyDate, string checkerEmpId, string evaluatedEmployeeID)
    {
        //Add List of Arguments for new employee
        IDictionary<string, object> employeesToBeProcessed = new Dictionary<string, object>();

        employeesToBeProcessed.Add("@proc_EID", checkerEmpId);
        employeesToBeProcessed.Add("@vacancy_No", vacancyNo);
        // date can be a string type
        //the date formst should be : YYYY-MM-DD
        //eg: "2015-02-28"
        employeesToBeProcessed.Add("@vacancyDateTemp", vacancyDate);
        employeesToBeProcessed.Add("@applicantId", evaluatedEmployeeID);

        //Pass Stored Procedure Name and parameter list.
        DBOperationsUtil dpOperation = new DBOperationsUtil(spName, employeesToBeProcessed);

        //call store to DB mathod and get reponse.
        return dpOperation.getRecordAsListOfString("EID");
    }
 //The method to get the next applicant for 1st phase evaluation
 public List<string> getNextEvaluatedApplicants1stPhase(int hrOfficerType)
 {
     List<string> listOfNotEvaluatedEmployee = null;
     TransactionResponse response = new TransactionResponse();
     try
     {
         //Add List of Arguments for new employee
         IDictionary<string, object> parameters = new Dictionary<string, object>();
         parameters.Add("@vacancy_No", vacanyEvaluationForm.VacancyNo);
         parameters.Add("@vacancy_date", vacanyEvaluationForm.VacancyDate);
         parameters.Add("@hrOfficerType", hrOfficerType);
         DBOperationsUtil dpOperation = new DBOperationsUtil(DbAccessConstants.spGetNotEvaluatedApplicants, parameters);
         listOfNotEvaluatedEmployee = dpOperation.getRecordAsListOfString("EID");
         if (listOfNotEvaluatedEmployee != null && listOfNotEvaluatedEmployee.Count > 0)
         {
             response.Data = listOfNotEvaluatedEmployee.ToArray();
         }
     }
     catch (SqlException ex)
     {
         //Other SqlException is catched
         response.setMessageType(TransactionResponse.SeverityLevel.ERROR);
         response.setMessage(DBOperationErrorConstants.M_UNKNOWN_ERROR_VERIFY_COMPLETE_VANCANCY);
         response.setErrorCode(DBOperationErrorConstants.E_UNKNOWN_ERROR_AT_DB_OOPERATION);
         response.setSuccess(false);
     }
     //CATCH ANY OTHER EXCEPTION, dont let user see any kind of unexpected error
     catch (Exception ex)
     {
         //Write this exception to file for investigation of the issue later.
         logException(ex);
         LoggerManager.upDateWithGenericErrorMessage(response);
     }
     return listOfNotEvaluatedEmployee;
 }