Esempio n. 1
0
        /// <summary>
        /// 根据处室部门的ID和用户账号找出用户所属该处室下的科室
        /// </summary>
        /// <param name="strDeptID">部门ID</param>
        /// <param name="strUserID">用户账号</param>
        /// <param name="iFloorCode">层级(1.处室,2.科室……)</param>
        /// <returns>ViewBase</returns>
        public static ViewBase GetDeptByDeptUser(string strDeptID, string strUserID, int iFloorCode)
        {
            ViewBase vb = null;

            if (string.IsNullOrEmpty(strUserID) == false)
            {
                vb = OADept.GetDeptByUser(strUserID, iFloorCode);
                if (string.IsNullOrEmpty(strDeptID) == false && OADept.ConvertInt(strDeptID) != int.MinValue)
                {
                    if (vb != null)
                    {
                        vb.Condition = "a.ParentID=" + OADept.ConvertInt(strDeptID);
                    }
                }
            }
            return(vb);
        }
Esempio n. 2
0
 /// <summary>
 /// 根据用户账号获取他所在部门信息绑定到DropDownList
 /// </summary>
 /// <param name="ddl">下拉菜单ID</param>
 /// <param name="strUserID">用户账号</param>
 /// <param name="iFloorCode">层级(0.自己所在部门;1.处级部门;2.科级部门;-1.所有部门)</param>
 /// <param name="bIsNeedBlank">是否需要空行</param>
 public static void GetDeptByUser(DropDownList ddl, string strUserID, int iFloorCode, bool bIsNeedBlank)
 {
     OADept.BindDropDownList(ddl, OADept.GetDeptByUser(strUserID, iFloorCode), bIsNeedBlank);
 }