Beispiel #1
0
        /// <summary>
        /// 显示当前用户信息 TODO
        /// </summary>

        /*public void CurrentUserInfo() {
         *  FrmEditUser dlg = new FrmEditUser();
         *  var loginUserInfo = Cache.Instance["LoginUserInfo"] as LoginUserInfo;
         *  dlg.ID = loginUserInfo.Id;
         *  dlg.StartPosition = FormStartPosition.CenterScreen;
         *  dlg.ShowDialog();
         * }*/
        #endregion

        /// <summary>
        /// 根据机构分类获取对应的图形序号
        /// </summary>
        /// <param name="category">机构分类</param>
        /// <returns></returns>
        public Int32 GetImageIndex(OuType ouType)
        {
            /*if (ouType == OuType.公司)
             * {
             *  index = 1;
             * }
             * else if (ouType == OuType.部门)
             * {
             *  index = 2;
             * }
             * else if (ouType == OuType.工作组)
             * {
             *  index = 3;
             * }*/
            return((Int32)ouType - 1);
        }
        /// <summary>
        /// 根据机构分类获取对应的图形序号
        /// </summary>
        /// <param name="category">机构分类</param>
        /// <returns></returns>
        protected string GetIconcls(OuType ouType)
        {
            string result = "icon-house";

            if (ouType == OuType.公司)
            {
                result = "icon-organ";
            }
            else if (ouType == OuType.部门)
            {
                result = "icon-group";
            }
            else if (ouType == OuType.工作组)
            {
                result = "icon-group";
            }
            return(result);
        }
        /// <summary>
        /// 根据机构分类获取对应的图形序号
        /// </summary>
        /// <param name="category">机构分类</param>
        /// <returns></returns>
        protected string GetBootstrapIcon(OuType ouType)
        {
            string result = "fa fa-home icon-state-danger icon-lg";

            if (ouType == OuType.公司)
            {
                result = "fa fa-sitemap icon-state-warning icon-lg";
            }
            else if (ouType == OuType.部门)
            {
                result = "fa fa-users icon-state-info icon-lg";
            }
            else if (ouType == OuType.工作组)
            {
                result = "fa fa-user icon-state-success icon-lg";
            }
            return(result);
        }
        /// <summary>
        /// 根据机构分类获取对应的图形序号
        /// </summary>
        /// <param name="category">机构分类</param>
        /// <returns></returns>
        protected string GetImageIndex(OuType ouType)
        {
            string result = iconBasePath + "house.png";

            if (ouType == OuType.公司)
            {
                result = iconBasePath + "organ.png";
            }
            else if (ouType == OuType.部门)
            {
                result = iconBasePath + "group.png";
            }
            else if (ouType == OuType.工作组)
            {
                result = iconBasePath + "group.png";
            }
            return(result);
        }