Exemplo n.º 1
0
        /// <summary>
        /// 获取公司岗位信息
        /// </summary>
        /// <returns></returns>
        public static DataTable GetQuarterInfoWithCompanyCD()
        {
            //公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

            return(DeptQuarterDBHelper.GetQuarterInfoWithCompanyCD(companyCD));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通过机构ID获取岗位信息
        /// </summary>
        /// <param name="deptID"></param>
        /// <returns></returns>
        public static string GetQuarterInfoWithDeptID(string deptID, string quarterID)
        {
            //变量定义
            StringBuilder sbDeptQuarterInfo = new StringBuilder();
            //获取公司代码
            string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            //获取机构岗位信息
            DataTable dtDeptQuarterInfo = DeptQuarterDBHelper.GetQuarterInfoWithDeptID(deptID, quarterID, companyCD);

            //机构岗位数据存在时
            if (dtDeptQuarterInfo != null && dtDeptQuarterInfo.Rows.Count > 0)
            {
                //生成岗位信息
                sbDeptQuarterInfo.Append(GetQuarterTreeInfo(dtDeptQuarterInfo));
            }
            //机构岗位信息不存在时
            else
            {
                //生成子树代码
                sbDeptQuarterInfo.Append("<table border='0' cellpadding='0' cellspacing='0'><tr><td>");
                sbDeptQuarterInfo.Append("<div id='divDQuarterName_" + deptID + "' onclick=\"SetSelectValue('','','','" + deptID + "');\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>");
                sbDeptQuarterInfo.Append("</td></tr></table>");
            }

            //返回机构岗位信息
            return(sbDeptQuarterInfo.ToString());
        }
Exemplo n.º 3
0
        /// <summary>
        /// 查询机构岗位信息
        /// </summary>
        /// <param name="quarterID">机构岗位ID</param>
        /// <returns></returns>
        public static DataTable GetDeptQuarterInfoWithID(string quarterID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            //设置公司代码
            string CompanyCD = userInfo.CompanyCD;

            return(DeptQuarterDBHelper.GetDeptQuarterInfoWithID(quarterID, CompanyCD));
        }
Exemplo n.º 4
0
        public static DataTable GetQuarterModelSet(string DeptID, string QuarterNo)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            //设置公司代码
            string CompanyCD = userInfo.CompanyCD;

            return(DeptQuarterDBHelper.GetQuarterModelSet(DeptID, QuarterNo, CompanyCD));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 查询机构岗位信息
        /// </summary>
        /// <param name="quarterID">机构岗位ID</param>
        /// <returns></returns>
        public static DataTable GetSubQuarterInfoWithID(string quarterID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            //设置公司代码

            string CompanyCD = userInfo.CompanyCD;
            //执行查询
            DataTable dtQuarterInfo = DeptQuarterDBHelper.SearchQuarterInfo(quarterID, CompanyCD);

            //返回
            return(dtQuarterInfo);
        }
Exemplo n.º 6
0
        public static bool SaveQuarterSet(IList <QuterModuleSetModel> QuterModuleSetList)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //定义返回变量
            bool isSucc = false;

            //执行插入操作
            isSucc = DeptQuarterDBHelper.SaveQuarterSet(QuterModuleSetList);

            return(isSucc);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 删除机构岗位信息
        /// </summary>
        /// <param name="quarterID">组织机构ID</param>
        /// <returns></returns>
        public static bool DeleteDeptQuarterInfo(string quarterID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            //设置公司代码

            string CompanyCD = userInfo.CompanyCD;
            //执行删除操作
            bool isSucc = DeptQuarterDBHelper.DeleteQuarterInfo(quarterID, CompanyCD);
            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }

            //操作日志
            LogInfoModel logModel = InitLogInfo(quarterID);

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

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

            return(isSucc);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 获取机构岗位分类的方法
        /// </summary>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static DataTable GetQuarterType()
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            return(DeptQuarterDBHelper.GetQuarterType(userInfo.CompanyCD));
        }
Exemplo n.º 9
0
        /// <summary>
        /// 编辑机构岗位信息
        /// </summary>
        /// <param name="model">保存信息</param>
        /// <returns></returns>
        public static bool SaveDeptQuarterInfo(DeptQuarterModel model)
        {
            //获取登陆用户信息
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

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

            //更新
            if (ConstUtil.EDIT_FLAG_UPDATE.Equals(model.EditFlag))
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                    //执行更新操作
                    isSucc = DeptQuarterDBHelper.UpdateDeptQuarterInfo(model);
                }
                catch (Exception ex)
                {
                    //输出系统日志
                    WriteSystemLog(userInfo, ex);
                }
            }
            //插入
            else
            {
                try
                {
                    logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                    //执行插入操作
                    isSucc = DeptQuarterDBHelper.InsertDeptQuarterInfo(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);
        }
Exemplo n.º 10
0
 public static DataTable selectQuarterSet(string DescibleID)
 {
     return(DeptQuarterDBHelper.selectQuarterSet(DescibleID));
 }
Exemplo n.º 11
0
 public static DataTable GetQuarterDescrible( )
 {
     return(DeptQuarterDBHelper.GetQuarterDescrible());
 }