当前位置: 首页>>代码示例>>C#>>正文


C# DBOperationsUtil.getRecordAsListOfString方法代码示例

本文整理汇总了C#中DBOperationsUtil.getRecordAsListOfString方法的典型用法代码示例。如果您正苦于以下问题:C# DBOperationsUtil.getRecordAsListOfString方法的具体用法?C# DBOperationsUtil.getRecordAsListOfString怎么用?C# DBOperationsUtil.getRecordAsListOfString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBOperationsUtil的用法示例。


在下文中一共展示了DBOperationsUtil.getRecordAsListOfString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getVacancyList

    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");
    }
开发者ID:ETH-WORKS-DASHBOARD,项目名称:CBEHR,代码行数:10,代码来源:VacancyRegistrationAndEvaluationManager.cs

示例2: getNotProcessedEmployees

    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");
    }
开发者ID:ETH-WORKS-DASHBOARD,项目名称:CBEHR,代码行数:10,代码来源:VacancyRegistrationAndEvaluationManager.cs

示例3: getNotEvaluatedApplicantsForSecondPhase

 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;
 }
开发者ID:ETH-WORKS-DASHBOARD,项目名称:CBEHR,代码行数:45,代码来源:VacancyRegistrationAndEvaluationManager.cs

示例4: getListOfEmployeeForResponsibleHROfficer

    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");
    }
开发者ID:ETH-WORKS-DASHBOARD,项目名称:CBEHR,代码行数:20,代码来源:VacancyRegistrationAndEvaluationManager.cs

示例5: getNextEvaluatedApplicants1stPhase

 //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;
 }
开发者ID:ETH-WORKS-DASHBOARD,项目名称:CBEHR,代码行数:36,代码来源:VacancyRegistrationAndEvaluationManager.cs


注:本文中的DBOperationsUtil.getRecordAsListOfString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。