asp.net 权限设置
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Pub 的摘要说明
/// </summary>
public static class Pub
{
//对应一个公共类
//得到是否有模块权限方法
// 11111111;10001111 第一段就代表合同,第二段代表仪表
public static bool bModuleRole(string strRole, string ModuleType)
{
string[] ArryRole=strRole.Split(';');
string subRole = "00000000";
switch (ModuleType)
{
case "ht":
subRole = ArryRole[0];
break;
case "yb":
subRole = ArryRole[1];
break;
}
//如果全部是零,那么没权限
if (int.Parse(subRole)>0)
{
return true;
}
else
{
&nbs
相关文档:
首页:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
Asp.net常用的51个代码(非常实用)
1.//弹出对话框.点击转向指定页面
CODE:
Response.Write("<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
Response.Write("<script>window.location ='http://www.51aspx.com/bizpulic/upmeb.aspx'</script&g ......
cs文件:
using System.IO;
string context = "";
string path = HttpContext.Current.Server.MapPath("") + "\\test\\test.html";
System.Text.Encoding code = System.Text.Encoding.GetEncoding("utf-8");
Stre ......
平台:vs2005,ecc6 ,orcale 数据库
1.首先用se37,建立一个读取函数,如图
2.先添加三个com组件Interop.SAPFunctionsOCX.dll,Interop.SAPLogonCtrl.dll,Interop.SAPTableFactoryCtrl.dll
下面的代码我是转载其他网站,
以web形式对function module进行调用与form形式基本一样,唯一值得注意的地方就是:"An ActiveX control ......