做国外的营销的网站,如何更改网站关键词,高端女装品牌前十名,七米网站开发原创不易#xff0c;打字不易#xff0c;截图不易#xff0c;多多点赞#xff0c;送人玫瑰#xff0c;留有余香#xff0c;财务自由明日实现 1、权限概述
在应用软件中#xff0c;通常将软件的功能分为若干个子程序#xff0c;通过主程序调用。那么#xff0c;通过…原创不易打字不易截图不易多多点赞送人玫瑰留有余香财务自由明日实现 1、权限概述
在应用软件中通常将软件的功能分为若干个子程序通过主程序调用。那么通过众多客户来说如果设置各人的权限呢?软件系统的权限控制几乎是非常常见且必备的这篇文章整理下常见的九种模型几乎基本够你用了主流的权限模型主要有以下9种
1、ACL模型
访问控制列表
2、DAC模型
自主访问控制
3、MAC模型
强制访问控制
4、ABAC模型
基于属性的访问控制更灵活复杂
5、RBAC模型
基于角色的权限访问控制最常用
6、TBAC模型
基于任务和工作流的访问控制
7、T-RBAC模型
基于任务和角色的访问控制
8、OBAC模型
基于对象的访问控制
9、UCON模型
使用控制模型 2、权限实现 本项目没有采用复杂的权限管理只采用最简单的操作方法具体是根据不同角色隐藏或显示菜单具体实现方法是
1创建转换器对象 using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;namespace West.StoreMgr.Helper.Converter
{/// summary/// 菜单权限转换器/// /summarypublic class AdminVisibleConverter : IValueConverter{public object Convert(object value, Type targetType, object parameter, CultureInfo culture){if (value null) return Visibility.Collapsed;if (int.TryParse(value.ToString(), out int index)){return index 0 ? Visibility.Visible : Visibility.Collapsed;}else{return Visibility.Collapsed;}}public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture){throw new NotImplementedException();}}
}2、主界面引入转换器
Window x:ClassWest.StoreMgr.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:West.StoreMgr xmlns:Controlclr-namespace:West.StoreMgr.Controlmc:IgnorabledDataContext{Binding Source{StaticResource Locator},PathMain}WindowStartupLocationCenterScreenxmlns:converterclr-namespace:West.StoreMgr.Helper.ConverterTitle欢迎使用仓库管理系统 Height720 Width1380Window.Resourcesconverter:AdminVisibleConverter x:KeyAdminVisibleConverter//Window.ResourcesGrid!--整体布局分为2行2列--Grid.ColumnDefinitionsColumnDefinition Width276/ColumnDefinition//Grid.ColumnDefinitionsGrid.RowDefinitionsRowDefinition Height61/RowDefinition//Grid.RowDefinitions!--第1行第1列标识名称--Grid Grid.Row0 Grid.Column0 Tag标志 Background#367FA8TextBlock Text企业仓库管理系统 HorizontalAlignmentCenter VerticalAlignmentCenter Foreground#F6A518 FontSize28//Grid!--第1行第2列帐号信息--Grid Grid.Row0 Grid.Column1 Tag顶栏 Background#3C8DBBGrid.ColumnDefinitionsColumnDefinition/ColumnDefinition//Grid.ColumnDefinitionsStackPanel Grid.Column0 HorizontalAlignmentLeft VerticalAlignmentCenter OrientationHorizontalTextBlock Margin10 FontSize16 Text#xf039; FontFamilyFonts/#FontAwesome ForegroundWhite VerticalAlignmentCenter/TextBlock Margin0 10 0 10 FontSize16 Text欢迎 ForegroundWhite VerticalAlignmentCenter/TextBlock Margin5 10 0 10 FontSize16 Text{Binding AppData.User.Name} ForegroundWhite VerticalAlignmentCenter Style{StaticResource TextBoxBanberStyle} MouseUpTextBlock_MouseUp_2//StackPanelStackPanel Grid.Column1 HorizontalAlignmentRight VerticalAlignmentCenter OrientationHorizontal Margin0 0 20 0TextBlock Margin10 FontSize16 Text#xf023; FontFamilyFonts/#FontAwesome ForegroundWhite VerticalAlignmentCenter/TextBlock Margin0 10 0 10 FontSize16 Text修改密码 ForegroundWhite VerticalAlignmentCenter Style{StaticResource TextBoxBanberStyle} MouseUpTextBlock_MouseUp_1/TextBlock Margin10 FontSize16 Text#xf08b; FontFamilyFonts/#FontAwesome ForegroundWhite VerticalAlignmentCenter/TextBlock Margin0 10 0 10 FontSize16 Text退出系统 ForegroundWhite Style{StaticResource TextBoxBanberStyle} MouseUpTextBlock_MouseUp //StackPanel/Grid!--第2行1列菜单--Grid Grid.Row1 Grid.Column0 Tag菜单Grid.RowDefinitionsRowDefinition Heightauto/RowDefinition//Grid.RowDefinitionsBorder Height41 Background#1A2327 VerticalAlignmentCenterTextBlock Text导航菜单 FontSize20 ForegroundAntiqueWhite VerticalAlignmentCenter//Border!--左侧主菜单--ScrollViewer Grid.Row1 VerticalScrollBarVisibilityAutoStackPanel Background#222C32RadioButton x:NameIndexView ClickStoreView_Checked Height50 Content控制台首页 FontSize16 Tag#xf17a; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /!--基础数据菜单加上权限设置--Expander Background#1D282B ExpandDirectionDown SnapsToDevicePixelsTrue VerticalAlignmentTop Style{DynamicResource ExpanderStyle} Visibility{Binding AppData.User.Role,Converter{StaticResource AdminVisibleConverter}}Expander.HeaderStackPanel OrientationHorizontal Height50 BackgroundTransparentTextBlock Widthauto Margin10 0 10 0 Text#xf170; FontFamilyFonts/#FontAwesome FontSize22 ForegroundRed VerticalAlignmentCenter/TextBlockTextBlock Width200 FontSize18 Text基础数据 Foreground#918C8C VerticalAlignmentCenter/TextBlock/StackPanel/Expander.HeaderExpander.ContentStackPanel Background#F6F8F8RadioButton x:NameGoodsTypeView ClickStoreView_Checked Height30 Content物资设置 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameGoodsView ClickStoreView_Checked Height30 Content物资登记 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton NameSupplierView ClickStoreView_Checked Height30 Content供应商设置 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton NameCustomerView ClickStoreView_Checked Height30 Content客户管理 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameStoreView ClickStoreView_Checked Height30 Content仓库设置 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameSpecView ClickStoreView_Checked Height30 Content规格设置 FontSize16 Tag#xf069; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F //StackPanel/Expander.Content/Expander!--物品管理菜单--Expander Background#1D282B ExpandDirectionDown SnapsToDevicePixelsTrue VerticalAlignmentTop Style{DynamicResource ExpanderStyle}Expander.HeaderStackPanel OrientationHorizontal Height50 BackgroundTransparentTextBlock Widthauto Margin10 0 10 0 Text#xf170; FontFamilyFonts/#FontAwesome FontSize22 ForegroundRed VerticalAlignmentCenter/TextBlockTextBlock Width200 FontSize18 Text物品管理 Foreground#918C8C VerticalAlignmentCenter/TextBlock/StackPanel/Expander.HeaderExpander.ContentStackPanel Background#F6F8F8RadioButton x:NameInStoreView ClickStoreView_Checked Height30 Content入库管理 FontSize16 Tag#xf172; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameOutStoreView ClickStoreView_Checked Height30 Content出库管理 FontSize16 Tag#xf172; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameInventoryView ClickStoreView_Checked Height30 Content盘存管理 FontSize16 Tag#xf172; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F //StackPanel/Expander.Content/Expander!--查询统计菜单--Expander Background#1D282B ExpandDirectionDown SnapsToDevicePixelsTrue VerticalAlignmentTop Style{DynamicResource ExpanderStyle}Expander.HeaderStackPanel OrientationHorizontal Height50 BackgroundTransparentTextBlock Widthauto Margin10 0 10 0 Text#xf170; FontFamilyFonts/#FontAwesome FontSize22 ForegroundRed VerticalAlignmentCenter/TextBlockTextBlock Width200 FontSize18 Text查询统计 Foreground#918C8C VerticalAlignmentCenter/TextBlock/StackPanel/Expander.HeaderExpander.ContentStackPanel Background#F6F8F8RadioButton x:NameQueryStockView ClickStoreView_Checked Height30 Content库存查询 FontSize16 Tag#xf080; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameQueryInStoreView ClickStoreView_Checked Height30 Content入库查询 FontSize16 Tag#xf080; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameQueryOutStoreView ClickStoreView_Checked Height30 Content出库查询 FontSize16 Tag#xf080; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F /RadioButton x:NameLiveChartView ClickStoreView_Checked Height30 Content报表统计 FontSize16 Tag#xf080; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F //StackPanel/Expander.Content/Expander!--系统维护菜单--Expander Background#1D282B ExpandDirectionDown SnapsToDevicePixelsTrue VerticalAlignmentTop Style{DynamicResource ExpanderStyle} Visibility{Binding AppData.User.Role,Converter{StaticResource AdminVisibleConverter}}Expander.HeaderStackPanel OrientationHorizontal Height50 BackgroundTransparentTextBlock Widthauto Margin10 0 10 0 Text#xf170; FontFamilyFonts/#FontAwesome FontSize22 ForegroundRed VerticalAlignmentCenter/TextBlockTextBlock Width200 FontSize18 Text系统维护 Foreground#918C8C VerticalAlignmentCenter/TextBlock/StackPanel/Expander.HeaderExpander.ContentStackPanel Background#F6F8F8RadioButton x:NameDataExportView ClickStoreView_Checked Height30 Content数据导出 FontSize16 Tag#xf073; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F //StackPanel/Expander.Content/Expander!--系统应用菜单--Expander Background#1D282B ExpandDirectionDown SnapsToDevicePixelsTrue VerticalAlignmentTop Style{DynamicResource ExpanderStyle}Expander.HeaderStackPanel OrientationHorizontal Height50 BackgroundTransparentTextBlock Widthauto Margin10 0 10 0 Text#xf170; FontFamilyFonts/#FontAwesome FontSize22 ForegroundRed VerticalAlignmentCenter/TextBlockTextBlock Width200 FontSize18 Text系统应用 Foreground#918C8C VerticalAlignmentCenter/TextBlock/StackPanel/Expander.HeaderExpander.ContentStackPanel Background#F6F8F8!--权限设置--RadioButton x:NameUserInfoView ClickStoreView_Checked Height30 Content用户管理 FontSize16 Tag#xf2bb; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F Visibility{Binding AppData.User.Role,Converter{StaticResource AdminVisibleConverter}} /RadioButton ClickRadioButton_Click Height30 Content退出系统 FontSize16 Tag#xf2bb; Style{DynamicResource RadioButtonMenuStyle} Foreground#85979F //StackPanel/Expander.Content/Expander/StackPanel/ScrollViewer/Grid!--第2行2列内容--Grid Grid.Row1 Grid.Column1 Tag舞台 Background#E4ECEFContentControl x:Namecontainer!--Control:ButtonCard Logo#xf1ae; Title入库管理 Content这是一个可以入库的快捷操作/Control:ButtonCard--/ContentControl/Grid/Grid
/Window3使用转换器 3、运行效果 文章转载自: http://www.morning.wphzr.cn.gov.cn.wphzr.cn http://www.morning.zbqsg.cn.gov.cn.zbqsg.cn http://www.morning.ysnbq.cn.gov.cn.ysnbq.cn http://www.morning.hxpsp.cn.gov.cn.hxpsp.cn http://www.morning.qcnk.cn.gov.cn.qcnk.cn http://www.morning.bhgnj.cn.gov.cn.bhgnj.cn http://www.morning.qsy36.cn.gov.cn.qsy36.cn http://www.morning.prgdy.cn.gov.cn.prgdy.cn http://www.morning.fynkt.cn.gov.cn.fynkt.cn http://www.morning.kfcfq.cn.gov.cn.kfcfq.cn http://www.morning.khfk.cn.gov.cn.khfk.cn http://www.morning.xjtnp.cn.gov.cn.xjtnp.cn http://www.morning.mdmxf.cn.gov.cn.mdmxf.cn http://www.morning.mszls.cn.gov.cn.mszls.cn http://www.morning.jcfdk.cn.gov.cn.jcfdk.cn http://www.morning.bnjnp.cn.gov.cn.bnjnp.cn http://www.morning.yswxq.cn.gov.cn.yswxq.cn http://www.morning.mrfr.cn.gov.cn.mrfr.cn http://www.morning.fllx.cn.gov.cn.fllx.cn http://www.morning.plfrk.cn.gov.cn.plfrk.cn http://www.morning.lcwhn.cn.gov.cn.lcwhn.cn http://www.morning.fjfjm.cn.gov.cn.fjfjm.cn http://www.morning.jhxtm.cn.gov.cn.jhxtm.cn http://www.morning.yuminfo.com.gov.cn.yuminfo.com http://www.morning.jfjfk.cn.gov.cn.jfjfk.cn http://www.morning.dpdns.cn.gov.cn.dpdns.cn http://www.morning.xdwcg.cn.gov.cn.xdwcg.cn http://www.morning.hnrqn.cn.gov.cn.hnrqn.cn http://www.morning.bgqqr.cn.gov.cn.bgqqr.cn http://www.morning.jwskq.cn.gov.cn.jwskq.cn http://www.morning.wtdyq.cn.gov.cn.wtdyq.cn http://www.morning.jxltk.cn.gov.cn.jxltk.cn http://www.morning.tpssx.cn.gov.cn.tpssx.cn http://www.morning.sjpbh.cn.gov.cn.sjpbh.cn http://www.morning.tgpgx.cn.gov.cn.tgpgx.cn http://www.morning.rxsgk.cn.gov.cn.rxsgk.cn http://www.morning.rshkh.cn.gov.cn.rshkh.cn http://www.morning.ykrss.cn.gov.cn.ykrss.cn http://www.morning.kkjhj.cn.gov.cn.kkjhj.cn http://www.morning.lphtm.cn.gov.cn.lphtm.cn http://www.morning.dfhkh.cn.gov.cn.dfhkh.cn http://www.morning.atoinfo.com.gov.cn.atoinfo.com http://www.morning.zlhbg.cn.gov.cn.zlhbg.cn http://www.morning.hblkq.cn.gov.cn.hblkq.cn http://www.morning.bxhch.cn.gov.cn.bxhch.cn http://www.morning.wkcl.cn.gov.cn.wkcl.cn http://www.morning.jqpyq.cn.gov.cn.jqpyq.cn http://www.morning.cfjyr.cn.gov.cn.cfjyr.cn http://www.morning.rckdq.cn.gov.cn.rckdq.cn http://www.morning.lrylj.cn.gov.cn.lrylj.cn http://www.morning.sjjtz.cn.gov.cn.sjjtz.cn http://www.morning.lbrrn.cn.gov.cn.lbrrn.cn http://www.morning.dplmq.cn.gov.cn.dplmq.cn http://www.morning.tfqfm.cn.gov.cn.tfqfm.cn http://www.morning.tbnpn.cn.gov.cn.tbnpn.cn http://www.morning.ghslr.cn.gov.cn.ghslr.cn http://www.morning.xpzgg.cn.gov.cn.xpzgg.cn http://www.morning.lxjcr.cn.gov.cn.lxjcr.cn http://www.morning.nnhrp.cn.gov.cn.nnhrp.cn http://www.morning.rgyts.cn.gov.cn.rgyts.cn http://www.morning.jbtwq.cn.gov.cn.jbtwq.cn http://www.morning.kfclh.cn.gov.cn.kfclh.cn http://www.morning.bpmft.cn.gov.cn.bpmft.cn http://www.morning.trzzm.cn.gov.cn.trzzm.cn http://www.morning.bttph.cn.gov.cn.bttph.cn http://www.morning.fldk.cn.gov.cn.fldk.cn http://www.morning.yzsdp.cn.gov.cn.yzsdp.cn http://www.morning.kjgdm.cn.gov.cn.kjgdm.cn http://www.morning.cmldr.cn.gov.cn.cmldr.cn http://www.morning.wjhqd.cn.gov.cn.wjhqd.cn http://www.morning.mrxqd.cn.gov.cn.mrxqd.cn http://www.morning.xgjhy.cn.gov.cn.xgjhy.cn http://www.morning.ytrbq.cn.gov.cn.ytrbq.cn http://www.morning.ltkms.cn.gov.cn.ltkms.cn http://www.morning.wpcfh.cn.gov.cn.wpcfh.cn http://www.morning.hwbmn.cn.gov.cn.hwbmn.cn http://www.morning.zdwjg.cn.gov.cn.zdwjg.cn http://www.morning.jiuyungps.com.gov.cn.jiuyungps.com http://www.morning.cylbs.cn.gov.cn.cylbs.cn http://www.morning.lmknf.cn.gov.cn.lmknf.cn