コード例 #1
0
        /// <summary>
        /// 根据ID获取项目来源信息
        /// </summary>
        /// <param name="projectSourceId"></param>
        /// <param name="softId"></param>
        /// <returns></returns>
        public ProjectSource GetProjectSource(int projectSourceId, int softId)
        {
            ////权限判断
            //loginService.HaveSuperAdminRight();

            ProjectSource projectSource = DABasicInfoHelper.GetProjectSource(projectSourceId, softId);

            //if (projectSource == null)
            //    throw new NotRightException();

            return(projectSource);
        }
コード例 #2
0
        /// <summary>
        /// 添加项目来源信息
        /// </summary>
        /// <param name="projectSource"></param>
        public void AddPrjectSource(ProjectSource projectSource)
        {
            //权限判断
            loginService.HaveSuperAdminRight();

            DABasicInfoHelper.AddProjectSource(projectSource);

            //记录登录日志
            loginService.AddLog(
                "AddPrjectSource",
                string.Format("添加项目来源(PrjectSource={0},Name={1})", projectSource.ProjectSourceID, projectSource.Name));
        }
コード例 #3
0
        /// <summary>
        /// 更新项目来源信息
        /// </summary>
        /// <param name="projectSource"></param>
        public void UpdateProjectSource(ProjectSource projectSource)
        {
            //权限判断
            loginService.HaveSuperAdminRight();

            ProjectSource oldProjectSource = DABasicInfoHelper.GetProjectSource(projectSource.ProjectSourceID, projectSource.SoftID);

            if (oldProjectSource == null)
            {
                throw new NotRightException();
            }

            DABasicInfoHelper.UpdateProjectSource(projectSource);

            //记录登录日志
            loginService.AddLog(
                "UpdateProjectSource",
                string.Format("更新项目来源(PrjectSource={0},Name={1},SoftID={2}(Old={3}))", projectSource.ProjectSourceID, projectSource.Name, projectSource.SoftID, oldProjectSource.Name));
        }
コード例 #4
0
        /// <summary>
        /// 删除项目来源信息
        /// </summary>
        /// <param name="projectSourceId"></param>
        /// <param name="softId"></param>
        public void DeleteProjectSource(int projectSourceId, int softId)
        {
            //权限判断
            loginService.HaveSuperAdminRight();

            ProjectSource projectSource = DABasicInfoHelper.GetProjectSource(projectSourceId, softId);

            if (projectSource == null)
            {
                throw new NotRightException();
            }

            DABasicInfoHelper.DeleteProjectSource(projectSourceId, softId);

            //记录登录日志
            loginService.AddLog(
                "DeleteProjectSource",
                string.Format("删除项目来源(PrjectSource={0},Name={1},SoftID={2})", projectSource.ProjectSourceID,
                              projectSource.Name, softId));
        }