当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 在项目中常常要定义不同的Project级别的用户和权限,仿照windows的Role/User/Access Right的控制,我的实现如下:1、在数据库中建立5个表:tSvRole, tSvUser, tSvObject, tSvRoleUser和tSvRoleObject,分别存储Role、...
 

 

 ·c++编程人员容易犯的10个c#错     »显示摘要«
    摘要:c++编程人员容易犯的10个c#错误 我们知道, c#的语法与c++非常相似,实现从c++向c#的转变,其困难不在于语言本身,而在于熟悉.net的可管理环境和对.net框架的理解。 尽管c#与c++在语法上的变化是很小的,几乎不会对我们有什么影响,但有些变化却足以使一些粗心的c++编程人员时刻铭记在心。在本篇文章中我们将讨论c++编程人员最容易犯的十个错误。 陷阱1: 没有明确的结束方法 几 ......
 ·asp.net datagrid实现多层表头     »显示摘要«
    摘要:using system;using system.collections;using system.componentmodel;using system.data;using system.drawing;using system.web;using system.web.sessionstate;using system.web.ui;using system.web.ui.webcontr......


分享:Project级别的权限控制

在项目中常常要定义不同的project级别的用户与权限,仿照windows的role/user/access right的控制,我的实现如下:

if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[tsvobject]) and objectproperty(id, nisusertable) = 1)drop table [dbo].[tsvobject]go 【程序编程相关:ActiveX控件的打包发布[无证书发布

1.在数据库中建立5个表:tsvrole, tsvuser, tsvobject, tsvroleuser与tsvroleobject,分别存储role.user.object.role-user对应关系以及role-object对应关系.建表的tsql如下: 【推荐阅读:怎么由DataSet将数据导入Excel

if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[tsvroleobject]) and objectproperty(id, nisusertable) = 1)drop table [dbo].[tsvroleobject]go 【扩展信息:Using a Custom Actio

if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[tsvrole]) and objectproperty(id, nisusertable) = 1)drop table [dbo].[tsvrole]go

if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[tsvroleuser]) and objectproperty(id, nisusertable) = 1)drop table [dbo].[tsvroleuser]go

if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[tsvuser]) and objectproperty(id, nisusertable) = 1)drop table [dbo].[tsvuser]go

create table [dbo].[tsvobject] ([fobjectid] [varchar] (30) collate sql_latin1_general_cp1_ci_as not null ,[fobjectname] [varchar] (50) collate sql_latin1_general_cp1_ci_as not null ) on [primary]go

create table [dbo].[tsvrole] ([froleid] [varchar] (30) collate sql_latin1_general_cp1_ci_as not null ,[frolename] [varchar] (50) collate sql_latin1_general_cp1_ci_as not null ) on [primary]go


...   下一页
 ·webconfig的设置节点说明     »显示摘要«
    摘要:有助于深入理解webconfig<?xml version="1.0" encoding="utf-8" ?><configuration> <appsettings> <add key="connectionstring" value="user id=sa;initial catal......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE