/// <summary> /// 获取方案ID /// </summary> /// <param name="sType">0 公司 , 1 部门 ,2 岗位</param> /// <param name="ID"></param> /// <returns></returns> public string GetSolutionIDByIDType(int sType, string ID) { SalarySolutionAssignBLL bll = new SalarySolutionAssignBLL(); string solutionID = bll.GetSolutionIDByAssignObjectID(ID); if (string.IsNullOrEmpty(solutionID)) { if (sType == 2) { PostBLL pbll = new PostBLL(); T_HR_POST post = pbll.GetPostById(ID); solutionID = bll.GetSolutionIDByAssignObjectID(post.T_HR_DEPARTMENT.DEPARTMENTID); if (string.IsNullOrEmpty(solutionID)) { solutionID = bll.GetSolutionIDByAssignObjectID(post.T_HR_DEPARTMENT.T_HR_COMPANY.COMPANYID); } } else if (sType == 1) { DepartmentBLL dbll = new DepartmentBLL(); T_HR_DEPARTMENT department = dbll.GetDepartmentById(ID); solutionID = bll.GetSolutionIDByAssignObjectID(department.T_HR_COMPANY.COMPANYID); } } return(solutionID); }
public void GenerateDepartmentSalary(string departID, string year, string month) { PostBLL bll = new PostBLL(); List <SMT_HRM_EFModel.T_HR_POST> emplist = bll.GetPostByDepartId(departID); foreach (var emp in emplist) { GeneratePostSalary(emp.POSTID, year, month); } }
public decimal GenerateDepartmentRecord(string departID, string year, string month) { decimal result = 0; PostBLL bll = new PostBLL(); List <T_HR_POST> emplist = bll.GetPostByDepartId(departID); foreach (var emp in emplist) { result += GeneratePostRecord(emp.POSTID, year, month); } return(result); }
/// <summary> /// 部门下是否有岗位 /// </summary> /// <param name="departID">部门ID</param> /// <returns>是否成功找到岗位</returns> public bool IsExistChilds(string departID) { //是否分配了岗位 PostBLL tmpBll = new PostBLL(); int count = tmpBll.GetPositionCount(departID); if (count > 0) { return(true); } else { return(false); } }
private string GetAssignObjectName(string type, string objectID) { string name = ""; int objectType = -1; int.TryParse(type, out objectType); switch ((AssignObjectType)objectType) { case AssignObjectType.Company: CompanyBLL cbll = new CompanyBLL(); T_HR_COMPANY company = cbll.GetCompanyById(objectID); name = (company == null) ? "" : company.CNAME; break; case AssignObjectType.Department: DepartmentBLL dbll = new DepartmentBLL(); T_HR_DEPARTMENT depart = dbll.GetDepartmentById(objectID); name = (depart == null) ? "" : depart.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME; break; case AssignObjectType.Post: PostBLL pbll = new PostBLL(); T_HR_POST post = pbll.GetPostById(objectID); name = (post == null) ? "" : post.T_HR_POSTDICTIONARY.POSTNAME; break; case AssignObjectType.Employee: EmployeeBLL ebll = new EmployeeBLL(); T_HR_EMPLOYEE employee = ebll.GetEmployeeByID(objectID); name = (employee == null) ? "" : employee.EMPLOYEECNAME; break; } return(name); }