/// <summary> ///部门 离职人数 /// </summary> /// <param name="DeptID"></param> /// <param name="monthStartDate"></param> /// <param name="monthEndDate"></param> /// <returns></returns> public static DataTable GetSeparationNum(string DeptID, string monthStartDate, string monthEndDate) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 string CompanyCD = userInfo.CompanyCD; return(EmployeeTestDBHelper.GetSeparationNum(DeptID, monthStartDate, monthEndDate, CompanyCD)); }
public static string getDept(string DeptID) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 string CompanyCD = userInfo.CompanyCD; return(EmployeeTestDBHelper.getDept(DeptID, CompanyCD)); }
/// <summary> /// 获取公司部门 /// </summary> /// <returns></returns> public static DataTable GetDeptInfo(string DeptID) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 string CompanyCD = userInfo.CompanyCD; return(EmployeeTestDBHelper.GetDeptInfo(CompanyCD, DeptID)); }
public static DataTable EmployeeExaminationReportInfo(EmployeeTestSearchModel model) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 model.CompanyCD = userInfo.CompanyCD; return(EmployeeTestDBHelper.EmployeeExaminationReportInfo(model)); }
/// <summary> /// 删除考试信息 /// </summary> /// <param name="testNo">考试编号</param> /// <returns></returns> public static bool DeleteTestInfo(string testNo) { //获取公司代码 string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //执行删除操作 bool isSucc = EmployeeTestDBHelper.DeleteTestInfo(testNo, companyCD); //获取删除的编号列表 string[] asseNoList = testNo.Split(','); //定义变量 string remark; //成功时 if (isSucc) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; } //遍历所有编号,登陆操作日志 for (int i = 0; i < asseNoList.Length; i++) { //获取编号 string no = asseNoList[i]; //替换两边的 ' no = no.Replace("'", string.Empty); //操作日志 LogInfoModel logModel = InitLogInfo(no); //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = ConstUtil.LOG_PROCESS_DELETE; //设置操作成功标识 logModel.Remark = remark; //登陆日志 LogDBHelper.InsertLog(logModel); } return(isSucc); }
/// <summary> /// 编辑考试记录信息 /// </summary> /// <param name="model">保存信息</param> /// <returns></returns> public static bool SaveTestInfo(EmployeeTestModel model) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 model.CompanyCD = userInfo.CompanyCD; model.ModifiedUserID = userInfo.UserID; //定义返回变量 bool isSucc = false; //操作日志 LogInfoModel logModel = InitLogInfo(model.TestNo); //更新 if (ConstUtil.EDIT_FLAG_UPDATE.Equals(model.EditFlag)) { try { logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; //执行更新操作 isSucc = EmployeeTestDBHelper.UpdateEmployeeTestInfo(model); } catch (Exception ex) { //输出系统日志 WriteSystemLog(userInfo, ex); } } //插入 else { try { logModel.Element = ConstUtil.LOG_PROCESS_INSERT; //执行插入操作 isSucc = EmployeeTestDBHelper.InsertEmployeeTestInfo(model); } catch (Exception ex) { //输出系统日志 WriteSystemLog(userInfo, ex); } } //更新成功时 if (isSucc) { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } //更新不成功 else { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } //登陆日志 LogDBHelper.InsertLog(logModel); return(isSucc); }
public static DataSet GetTestInfoByNO(string NO, string CompanyCD) { return(EmployeeTestDBHelper.GetTestInfoByNO(NO, CompanyCD)); }
/// <summary> /// 查询考试信息 /// </summary> /// <param name="testID">考试ID</param> /// <returns></returns> public static DataSet GetTestInfoByID(string testID) { return(EmployeeTestDBHelper.GetTestInfoByID(testID)); }