/// <summary>
        /// 获取用户菜单
        /// </summary>
        /// <param name="USERID">用户ID</param>
        /// <returns></returns>
        public List <Sys_ModuleInfo> GetUserMenu(string USERID)
        {
            List <Sys_ModuleInfo> data = new List <Sys_ModuleInfo>();

            ISys_RoleAuthorize dal = baseDal as ISys_RoleAuthorize;
            DataTable          dt  = dal.GetUserMenu(USERID).Tables[0];


            foreach (DataRow dr in dt.Rows)
            {
                Sys_ModuleInfo info = new Sys_ModuleInfo();
                info.F_Id          = dr["F_ID"].ToString();
                info.F_Layers      = dr["F_Layers"].ToString() == string.Empty ? 0 : Convert.ToInt32(dr["F_Layers"]);
                info.F_IsMenu      = dr["F_IsMenu"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_IsMenu"]);
                info.F_IsExpand    = dr["F_IsExpand"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_IsExpand"]);
                info.F_IsPublic    = dr["F_IsPublic"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_IsPublic"]);
                info.F_AllowEdit   = dr["F_AllowEdit"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_AllowEdit"]);
                info.F_AllowDelete = dr["F_AllowDelete"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_AllowDelete"]);
                info.F_SortCode    = dr["F_SortCode"].ToString() == string.Empty ? 0 : Convert.ToInt32(dr["F_SortCode"]);;
                info.F_DeleteMark  = dr["F_DeleteMark"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_DeleteMark"]);
                info.F_EnabledMark = dr["F_EnabledMark"].ToString() == string.Empty ? false : Convert.ToBoolean(dr["F_EnabledMark"]);
                info.F_ParentId    = dr["F_ParentId"].ToString();
                info.F_EnCode      = dr["F_EnCode"].ToString();
                info.F_FullName    = dr["F_FullName"].ToString();
                info.F_Icon        = dr["F_Icon"].ToString();
                info.F_Target      = dr["F_Target"].ToString();
                info.F_UrlAddress  = dr["F_UrlAddress"].ToString();

                data.Add(info);
            }

            return(data);
        }
Exemple #2
0
 //protected HtmlHead Head1;
 //protected HtmlForm form1;
 //protected Button Button1;
 //protected HtmlInputText UDepName;
 //protected HtmlInputText Phone;
 //protected DropDownList IsPosition;
 //protected DropDownList parentID;
 //protected HtmlInputText Orders;
 //protected HtmlTextArea Notes;
 //protected CheckBoxList powerList;
 //protected Button save_bt;
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         IList all = Sys_Module.Init().GetAll(null, "order by TypeName,Orders");
         for (int i = 0; i < all.Count; i++)
         {
             Sys_ModuleInfo sys_ModuleInfo = all[i] as Sys_ModuleInfo;
             this.powerList.Items.Add(new ListItem("【" + sys_ModuleInfo.TypeName + "】 - " + sys_ModuleInfo.ModuleName, string.Concat(sys_ModuleInfo.id)));
         }
         if (!string.IsNullOrEmpty(base.Request.QueryString["did"]))
         {
             this.GetFirtNode();
             this.parentID.DataSource     = this.li;
             this.parentID.DataTextField  = "Sh";
             this.parentID.DataValueField = "ID";
             this.parentID.DataBind();
             this.Show(base.Request.QueryString["did"]);
         }
         else
         {
             this.GetFirtNode();
             this.parentID.DataSource     = this.li;
             this.parentID.DataTextField  = "Sh";
             this.parentID.DataValueField = "ID";
             this.parentID.DataBind();
         }
     }
 }
Exemple #3
0
        //public static Hashtable GetModuleHash()
        //{
        //    Hashtable hashtable = new Hashtable();
        //    IList all = Sys_Module.Init().GetAll(null, null);
        //    IEnumerator enumerator = all.GetEnumerator();
        //    try
        //    {
        //        int num = 0;
        //        while (true)
        //        {
        //            bool flag = false;
        //            switch (num)
        //            {
        //                case 1:
        //                    num = 3;
        //                    continue;
        //                case 2:
        //                    {
        //                        if (!flag)
        //                        {
        //                            num = 1;
        //                            continue;
        //                        }
        //                        object current = enumerator.Current;
        //                        Sys_ModuleInfo sys_ModuleInfo = current as Sys_ModuleInfo;
        //                        hashtable.Add(sys_ModuleInfo.id.ToString(), sys_ModuleInfo.ModuleUrl);
        //                        num = 4;
        //                        continue;
        //                    }
        //                case 3:
        //                    goto IL_C9;
        //            }
        //        IL_5C:
        //            flag = enumerator.MoveNext();
        //            num = 2;
        //            continue;
        //            goto IL_5C;
        //        }
        //    IL_C9:
        //        goto IL_1F;
        //    }
        //    finally
        //    {
        //        while (true)
        //        {
        //            IDisposable disposable = enumerator as IDisposable;
        //            bool flag = disposable == null;
        //            int num2 = 0;
        //            while (true)
        //            {
        //                switch (num2)
        //                {
        //                    case 0:
        //                        if (!flag)
        //                        {
        //                            num2 = 2;
        //                            continue;
        //                        }
        //                        goto IL_126;
        //                    case 1:
        //                        goto IL_124;
        //                    case 2:
        //                        disposable.Dispose();
        //                        num2 = 1;
        //                        continue;
        //                }
        //                break;
        //            }
        //        }
        //    IL_124:
        //    IL_126: ;
        //    }
        //    Hashtable result;
        //    return result;
        //IL_1F:
        //    if (true)
        //    {
        //    }
        //    result = hashtable;
        //    return result;
        //}

        public static Hashtable GetModuleHash()
        {
            Hashtable   hashtable  = new Hashtable();
            IList       all        = Sys_Module.Init().GetAll(null, null);
            IEnumerator enumerator = all.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    object         current        = enumerator.Current;
                    Sys_ModuleInfo sys_ModuleInfo = current as Sys_ModuleInfo;
                    hashtable.Add(sys_ModuleInfo.id.ToString(), sys_ModuleInfo.ModuleUrl);
                }
            }

            finally

            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)

                {
                    disposable.Dispose();
                }
            }
            Hashtable result;

            result = hashtable;
            return(result);
        }
Exemple #4
0
        public void Delete(int id)
        {
            if (true)
            {
            }
            Sys_ModuleInfo sys_ModuleInfo = new Sys_ModuleInfo();

            sys_ModuleInfo.id = id;
            this.control.DeleteEntity(sys_ModuleInfo);
        }
Exemple #5
0
 //protected HtmlHead Head1;
 //protected HtmlForm form1;
 //protected Button Button1;
 //protected HtmlInputText RoleName;
 //protected CheckBoxList powerList;
 //protected HtmlTextArea Notes;
 //protected Button save_bt;
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         IList all = Sys_Module.Init().GetAll(null, "order by TypeName,Orders");
         for (int i = 0; i < all.Count; i++)
         {
             Sys_ModuleInfo sys_ModuleInfo = all[i] as Sys_ModuleInfo;
             this.powerList.Items.Add(new ListItem("<" + sys_ModuleInfo.TypeName + "> - " + sys_ModuleInfo.ModuleName, string.Concat(sys_ModuleInfo.id)));
         }
         if (!string.IsNullOrEmpty(base.Request.QueryString["rid"]))
         {
             this.Show(base.Request.QueryString["rid"]);
         }
     }
 }
Exemple #6
0
 public void Update(Sys_ModuleInfo com)
 {
     Sys_Module.dal.Update(com);
 }
Exemple #7
0
 public void Add(Sys_ModuleInfo com)
 {
     Sys_Module.dal.Add(com);
 }
Exemple #8
0
 public void Update(Sys_ModuleInfo Sys_Module)
 {
     this.control.UpdateEntity(Sys_Module, Sys_Module.id);
 }
Exemple #9
0
 public void Add(Sys_ModuleInfo Sys_Module)
 {
     this.control.AddEntity(Sys_Module);
 }