/// <summary>
        /// 获取申请单信息
        /// </summary>
        /// <param name="companyCD">公司代码</param>
        /// <returns></returns>
        public static DataTable GetApplyInfo()
        {
            //设置公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

            //执行查询
            return(EmplApplyNotifyDBHelper.GetApplyInfo(companyCD));
        }
        /// <summary>
        /// 查询调职信息
        /// </summary>
        /// <param name="model">查询条件</param>
        /// <returns></returns>
        public static DataTable SearchEmplApplyNotifyInfo(EmplApplyNotifyModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD = userInfo.CompanyCD;
            //执行查询
            return(EmplApplyNotifyDBHelper.SearchEmplApplyNotifyInfo(model));
        }
        /// <summary>
        /// 删除调职
        /// </summary>
        /// <param name="ApplyNotifyNo">申请编号</param>
        /// <returns></returns>
        public static bool DeleteEmplApplyNotifyInfo(string ApplyNotifyNo)
        {
            //获取公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            //执行删除操作
            bool isSucc = EmplApplyNotifyDBHelper.DeleteEmplApplyNotifyInfo(ApplyNotifyNo, companyCD);

            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //获取删除的编号列表
            string[] noList = ApplyNotifyNo.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);
        }
        /// <summary>
        /// 确认调职信息
        /// </summary>
        /// <param name="model">调职信息</param>
        /// <returns></returns>
        public static bool ConfirmEmplApplyNotifyInfo(EmplApplyNotifyModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD      = userInfo.CompanyCD;
            model.ModifiedUserID = userInfo.UserID;
            //定义返回变量
            bool isSucc = false;
            //操作日志
            LogInfoModel logModel = InitLogInfo(model.NotifyNo);

            //更新操作
            logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;

            isSucc = EmplApplyNotifyDBHelper.ConfirmEmplApplyNotifyInfo(model);

            //更新成功时
            if (isSucc)
            {
                //设置操作成功标识
                logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            //更新不成功
            else
            {
                //设置操作成功标识
                logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
            }

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

            return(isSucc);
        }
 /// <summary>
 /// 查询调职信息
 /// </summary>
 /// <param name="EmplApplyNotifyID">调职ID</param>
 /// <returns></returns>
 public static DataTable GetEmplApplyNotifyInfoWithID(string EmplApplyNotifyID)
 {
     return(EmplApplyNotifyDBHelper.GetEmplApplyNotifyInfoWithID(EmplApplyNotifyID));
 }
        /// <summary>
        /// 编辑调职信息
        /// </summary>
        /// <param name="model">调职信息</param>
        /// <returns></returns>
        public static bool SaveEmplApplyNotifyInfo(EmplApplyNotifyModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD      = userInfo.CompanyCD;
            model.ModifiedUserID = userInfo.UserID;
            //定义返回变量
            bool isSucc = false;
            //操作日志
            LogInfoModel logModel = InitLogInfo(model.NotifyNo);

            //更新
            if (!string.IsNullOrEmpty(model.ID))
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                    //执行更新操作
                    isSucc = EmplApplyNotifyDBHelper.UpdateEmplApplyNotifyInfo(model);
                }
                catch (Exception ex)
                {
                    //输出系统日志
                    WriteSystemLog(userInfo, ex);
                }
            }
            //插入
            else
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                    //执行插入操作
                    isSucc = EmplApplyNotifyDBHelper.InsertEmplApplyNotifyInfo(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);
        }