Ejemplo n.º 1
0
 /// <summary>
 /// 根据部门id获取部门名称
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string GetDepartMentNameByid(string id)
 {
     if (OrgClient == null)
     {
         OrgClient = new OrganizationWS.OrganizationServiceClient();
     }
     var department = OrgClient.GetDepartmentById(id);
     if (department == null)
     {
         return string.Empty;
     }
     if (!string.IsNullOrEmpty(department.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME))
     {
         return department.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;
     }
     else
     {
         return string.Empty;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 根据公司id获取公司名称
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string GetCompanNameByid(string id)
 {
     if (OrgClient == null)
     {
         OrgClient = new OrganizationWS.OrganizationServiceClient();
     }
     var company = OrgClient.GetCompanyById(id);
     if (company == null)
     {
         return string.Empty;
     }
     if (!string.IsNullOrEmpty(company.CNAME))
     {
         return company.CNAME;
     }
     else
     {
         return string.Empty;
     }
 }