Exemplo n.º 1
0
 /// <summary>
 /// 根据部门ID取出部门负责人、部门领导和大于某职位的人(向下遍历)
 /// </summary>
 /// <param name="strDeptID">部门ID</param>
 /// <param name="strPostName">职位名称</param>
 /// <param name="bDeptManger">是否绑定部门负责人</param>
 /// <param name="bDeptLeader">是否绑定部门领导</param>
 /// <param name="iFloorCode">层级(0自己,>0 子部门层数,-1所有)</param>
 /// <returns>DataTable</returns>
 private static ViewBase GetUserByDeptPost(string strDeptID, string strPostName, bool bDeptManger, bool bDeptLeader, int iFloorCode)
 {
     Common.LeaderType enmuType = Common.LeaderType.User;
     if (bDeptLeader && bDeptManger)
     {
         enmuType = Common.LeaderType.LeaderAndManager;
     }
     if (bDeptManger == false && bDeptLeader)
     {
         enmuType = Common.LeaderType.Leader;
     }
     if (bDeptManger && bDeptLeader == false)
     {
         enmuType = Common.LeaderType.Manager;
     }
     if (bDeptLeader == false && bDeptManger == false)
     {
         enmuType = Common.LeaderType.User;
     }
     return(OAUser.GetUserByDeptPost(strDeptID, strPostName, enmuType, iFloorCode));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 根据部门ID绑定部门负责人、部门领导和大于某职位的人(可以传空值)
 /// </summary>
 /// <param name="ddl">下拉菜单ID</param>
 /// <param name="strDeptID">部门ID</param>
 /// <param name="strPostName">职位名称</param>
 /// <param name="bDeptManger">是否绑定部门负责人</param>
 /// <param name="bDeptLeader">是否绑定部门领导</param>
 /// <param name="iFloorCode">层级(0自己,>0 子部门层数,-1所有)</param>
 public static void GetUserByDeptPost(DropDownList ddl, string strDeptID, string strPostName, bool bDeptManger, bool bDeptLeader, int iFloorCode)
 {
     OAUser.BindDropDownList(ddl, OAUser.GetUserByDeptPost(strDeptID, strPostName, bDeptManger, bDeptLeader, iFloorCode));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 根据部门ID绑定部门负责人,部门领导和大于某职位的人
 /// </summary>
 /// <param name="strDeptID">部门ID</param>
 /// <param name="strPostName">职位名称</param>
 /// <param name="bDeptManger">是否绑定部门负责人</param>
 /// <param name="bDeptLeader">是否绑定部门领导</param>
 /// <returns>返回以分号分隔的二维字符串数组</returns>
 public static string[] GetUserByDeptPostArray(string strDeptID, string strPostName, bool bDeptManger, bool bDeptLeader)
 {
     return(OAUser.GetUserArray(OAUser.GetUserByDeptPost(strDeptID, strPostName, bDeptManger, bDeptLeader, 0)));
 }