Beispiel #1
0
        /// <summary>
        /// 通过申请编号获取对应员工信息
        /// </summary>
        /// <param name="applyNo">申请ID</param>
        /// <returns></returns>
        public static DataTable GetEmployeeInfoWithNo(string applyNo)
        {
            //获取公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

            //查询并返回值
            return(MoveApplyDBHelper.GetEmployeeInfoWithNo(companyCD, applyNo));
        }
Beispiel #2
0
        /// <summary>
        /// 查询离职申请信息
        /// </summary>
        /// <param name="model">查询条件</param>
        /// <returns></returns>
        public static DataTable SearchMoveApplyInfo(MoveApplyModel model, int pageIndex, int pageCount, string ord, ref int TotalCount)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //设置公司代码
            model.CompanyCD = userInfo.CompanyCD;
            return(MoveApplyDBHelper.SearchMoveApplyInfo(model, pageIndex, pageCount, ord, ref TotalCount));
        }
Beispiel #3
0
        /// <summary>
        /// 删除离职申请
        /// </summary>
        /// <param name="applyNo">申请编号</param>
        /// <returns></returns>
        public static bool DeleteMoveApplyInfo(string applyNo)
        {
            //获取公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            //执行删除操作
            bool isSucc = MoveApplyDBHelper.DeleteMoveApplyInfo(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);
        }
Beispiel #4
0
        /// <summary>
        /// 编辑离职申请信息
        /// </summary>
        /// <param name="model">离职申请信息</param>
        /// <returns></returns>
        public static bool SaveMoveApplyInfo(MoveApplyModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

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

            //更新
            if (model.ID.Trim() != "")
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                    //执行更新操作
                    isSucc = MoveApplyDBHelper.UpdateMoveApplyInfo(model);
                }
                catch (Exception ex)
                {
                    //输出系统日志
                    WriteSystemLog(userInfo, ex);
                }
            }
            //插入
            else
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                    //执行插入操作
                    isSucc = MoveApplyDBHelper.InsertMoveApplyInfo(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);
        }
Beispiel #5
0
 /// <summary>
 /// 查询离职申请信息
 /// </summary>
 /// <param name="MoveApplyID">离职申请ID</param>
 /// <returns></returns>
 public static DataTable GetMoveApplyInfoWithID(string MoveApplyID)
 {
     return(MoveApplyDBHelper.GetMoveApplyInfoWithID(MoveApplyID));
 }