Beispiel #1
0
        //查询数据并显示
        private void SearchMenuType(string menuTypeName)
        {
            comboxMenuState.Text     = "";
            txtMenuTypeName.Text     = "";
            comboxMenuTypeOrder.Text = "";



            Expression <Func <MenuType, bool> > menuinfoFunc = n => n.MenuType_Name.Trim() == menuTypeName;

            foreach (var n in MenuTypeDAL.Query(menuinfoFunc))
            {
                if (n.MenuType_State != null)
                {
                    comboxMenuState.Text = n.MenuType_State.ToString();
                }
                if (n.MenuType_Name != null)
                {
                    txtMenuTypeName.Text = n.MenuType_Name;
                }
                if (n.MenuType_Order != null)
                {
                    comboxMenuTypeOrder.SelectedText = n.MenuType_Order.ToString();
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 绑定菜单类型
 /// </summary>
 private void MenuControlType()
 {
     coboxMenuControlType.DataSource    = MenuTypeDAL.Query();
     coboxMenuControlType.DisplayMember = "MenuType_Name";
     coboxMenuControlType.ValueMember   = "MenuType_ID";
     if (coboxMenuControlType.DataSource != null)
     {
         coboxMenuControlType.SelectedIndex = -1;
     }
 }
Beispiel #3
0
 private bool SearchName(string menuTypeName)
 {
     try
     {
         Expression <Func <MenuType, bool> > funview_userinfo = n => n.MenuType_Name.Trim() == menuTypeName;
         if (MenuTypeDAL.Query(funview_userinfo).Count() > 0)
         {
             return(true);
         }
     }
     catch
     {
         CommonalityEntity.WriteTextLog("角色管理 btnCheck()");
     }
     return(false);
 }