Example #1
0
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="userID">要删除的用户ID</param>
        public void DeleteUser(string userID)
        {
            EmployeeBLL  objBll       = new EmployeeBLL();
            Employee     obj          = objBll.GetEmployee(GetUser(userID).EmployeeID);
            SystemLogBLL systemLogBLL = new SystemLogBLL();

            systemLogBLL.WriteLog("删除员工“" + obj.EmployeeName + "(" + obj.WorkNo + ")”用户登录信息");
            dal.DeleteUser(userID);
        }
Example #2
0
 /// <summary>
 /// 更新用户
 /// </summary>
 /// <param name="user">更新后的用户信息</param>
 public void UpdateUser(SystemUser systemUser)
 {
     if (dal.UpdateUser(systemUser) && systemUser.Flag)
     {
         EmployeeBLL  objBll       = new EmployeeBLL();
         Employee     obj          = objBll.GetEmployee(systemUser.EmployeeID);
         SystemLogBLL systemLogBLL = new SystemLogBLL();
         systemLogBLL.WriteLog("修改员工“" + obj.EmployeeName + "(" + obj.WorkNo + ")”用户登录信息");
     }
 }
Example #3
0
 /// <summary>
 /// 新增用户
 /// </summary>
 /// <param name="user">新增的用户信息</param>
 /// <returns></returns>
 public void AddUser(SystemUser systemUser)
 {
     if (dal.AddUser(systemUser))
     {
         EmployeeBLL  objBll       = new EmployeeBLL();
         Employee     obj          = objBll.GetEmployee(systemUser.EmployeeID);
         SystemLogBLL systemLogBLL = new SystemLogBLL();
         systemLogBLL.WriteLog("新增员工“" + obj.EmployeeName + "(" + obj.WorkNo + ")”用户登录信息");
     }
 }
Example #4
0
        /// <summary>
        /// 删除组织机构
        /// </summary>
        /// <param name="organizationId">要删除的组织机构ID</param>
        public void DeleteOrganization(int organizationId, ref int errorCode)
        {
            int         code           = 0;
            string      strName        = GetOrganization(organizationId).ShortName;
            EmployeeBLL objEmployeeBll = new EmployeeBLL();

            if (objEmployeeBll.GetEmployeeByWhereClause("a.Org_ID=" + organizationId).Count > 0)
            {
                errorCode = 1;
                return;
            }

            dal.DeleteOrganization(organizationId, ref code);
            errorCode = code;

            if (code == 0)
            {
                objLogBll.WriteLog("删除组织机构“" + strName + "”基本信息");
            }
        }
        /// <summary>
        /// 返回某一培训计划所有参加培训计划的员工信息
        /// </summary>
        /// <param name="trainPlanID"></param>
        /// <param name="OrgID"></param>
        /// <returns></returns>
        public IList <Employee> GetTrainEmployeeInfoByPlanID(int trainPlanID, int OrgID)
        {
            EmployeeBLL      employeeBLL  = new EmployeeBLL();
            IList <Employee> employeeList = employeeBLL.GetEmployees(OrgID, "");
            ArrayList        objList      = GetEmployeeList(trainPlanID);

            foreach (Employee employee in employeeList)
            {
                if (objList.IndexOf(employee.EmployeeID) != -1)
                {
                    employee.Flag = true;
                }
                else
                {
                    employee.Flag = false;
                }
            }

            return(employeeList);
        }