コード例 #1
0
        public static DataTable GetRectApplyInfoWithIDByReport(string rectApplyID)
        {
            UserInfoUtil userInfo  = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       companyCD = userInfo.CompanyCD;

            return(RectApplyDBHelper.GetRectApplyInfoWithIDByReport(rectApplyID, companyCD));
        }
コード例 #2
0
        /// <summary>
        /// 编辑招聘申请信息
        /// </summary>
        /// <param name="model">招聘申请信息</param>
        /// <returns></returns>
        public static RectApplyModel SaveRectApplyInfo(RectApplyModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD      = userInfo.CompanyCD;
            model.ModifiedUserID = userInfo.UserID;
            //操作日志
            LogInfoModel logModel = InitLogInfo(model.RectApplyNo);

            //更新
            if (ConstUtil.EDIT_FLAG_UPDATE.Equals(model.EditFlag))
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                    //执行更新操作
                    model = RectApplyDBHelper.UpdateRectApplyInfo(model);
                }
                catch (Exception ex)
                {
                    //输出系统日志
                    WriteSystemLog(userInfo, ex);
                }
            }
            //插入
            else
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                    //执行插入操作
                    model = RectApplyDBHelper.InsertRectApplyInfo(model);
                }
                catch (Exception ex)
                {
                    //输出系统日志
                    WriteSystemLog(userInfo, ex);
                }
            }
            //更新成功时
            if (model.IsSuccess)
            {
                //设置操作成功标识
                logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            //更新不成功
            else
            {
                //设置操作成功标识
                logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
            }

            //登陆日志
            LogDBHelper.InsertLog(logModel);

            return(model);
        }
コード例 #3
0
        public static bool UpdateReportStatus(string status, string reprotNo, string DoStatus)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //执行查询
            return(RectApplyDBHelper.UpdateReportStatus(status, userInfo.CompanyCD, reprotNo, userInfo.UserID, DoStatus, userInfo.EmployeeID));
        }
コード例 #4
0
        /// <summary>
        /// 查询招聘申请信息
        /// </summary>
        /// <param name="model">查询条件</param>
        /// <returns></returns>
        public static DataTable SearchRectApplyInfo(RectApplyModel model, int pageIndex, int pageCount, string ord, ref int TotalCount)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD = userInfo.CompanyCD;
            return(RectApplyDBHelper.SearchRectApplyInfo(model, pageIndex, pageCount, ord, ref TotalCount));
        }
コード例 #5
0
        /// <summary>
        /// 删除招聘申请
        /// </summary>
        /// <param name="applyNo">申请编号</param>
        /// <returns></returns>
        public static bool DeleteRectApplyInfo(string applyNo)
        {
            //获取公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            //执行删除操作
            bool isSucc = RectApplyDBHelper.DeleteRectApplyInfo(applyNo, companyCD);

            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //获取删除的编号列表
            string[] noList = applyNo.Split(',');
            //遍历所有编号,登陆操作日志
            for (int i = 0; i < noList.Length; i++)
            {
                //获取编号
                string no = noList[i];
                //替换两边的 '
                no = no.Replace("'", string.Empty);

                //操作日志
                LogInfoModel logModel = InitLogInfo(no);
                //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空
                logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
                //设置操作成功标识
                logModel.Remark = remark;

                //登陆日志
                LogDBHelper.InsertLog(logModel);
            }

            return(isSucc);
        }
コード例 #6
0
        /// <summary>
        /// 从招聘申请中获取招聘目标
        /// </summary>
        /// <param name="companyCD">公司代码</param>
        /// <returns></returns>
        public static DataTable GetGoalInfoFromRectApply()
        {
            //公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            //执行查询
            DataTable dtApplyData = RectApplyDBHelper.GetGoalInfoFromRectApply(companyCD);

            //数据存在时,编辑年龄
            if (dtApplyData != null && dtApplyData.Rows.Count > 0)
            {
                for (int i = 0; i < dtApplyData.Rows.Count; i++)
                {
                    //获取最小年龄
                    string minAge = GetSafeData.ValidateDataRow_String(dtApplyData.Rows[i], "MinAge");
                    //获取最大年龄
                    string maxAge = GetSafeData.ValidateDataRow_String(dtApplyData.Rows[i], "MaxAge");
                    //最大年龄和最小年龄都未输入时
                    //最小年龄输入,最大年龄未输入时
                    if (!string.IsNullOrEmpty(minAge) && string.IsNullOrEmpty(maxAge))
                    {
                        //设置年龄
                        dtApplyData.Rows[i]["Age"] = minAge + " 岁以上";
                    }
                    //最大年龄输入,最小年龄未输入时
                    else if (string.IsNullOrEmpty(minAge) && !string.IsNullOrEmpty(maxAge))
                    {
                        //设置年龄
                        dtApplyData.Rows[i]["Age"] = maxAge + " 岁以下";
                    }
                    //最大年龄和最小年龄都输入时
                    else if (!string.IsNullOrEmpty(minAge) && !string.IsNullOrEmpty(maxAge))
                    {
                        //设置年龄
                        dtApplyData.Rows[i]["Age"] = minAge + " 岁 ~ " + maxAge + " 岁";
                    }
                }
            }
            //返回数据
            return(dtApplyData);
        }
コード例 #7
0
 public static DataTable GetGoalDetailsWithID(string rectApplyNo, string companyCD)
 {
     return(RectApplyDBHelper.GetGoalDetailsWithID(rectApplyNo, companyCD));
 }