許可權設計Extjs

來源:互聯網
上載者:User

標籤:

1.extjs4 作為前段架構,封裝grid window form treegrid等。
2.EF codefirst作為orm底層。
3.使用ioc 依賴注入作為程式注入。
4.使用aop作為許可權、日誌、異常的攔截。避免程式中大量使用日誌許可權異常代碼。
5.面向介面的服務,使用泛型模板作為資料操作。
6.使用log4net作為日誌底層。
7.良好的許可權控制,可判斷前台操作跟後台許可權操作。
8.使用NPOI作為excel操作架構。
9.許可權基於反射,根據特性判斷哪些可以控制許可權。
10.linq擴充,可查詢多where or等,更新刪除操作可以where().Update()
11.不僅是許可權系統,也是一套平台
QQ:2294508843

 

權限類別根據特性控制是否需用控制許可權,特性通過反射來擷取

 

public static Dictionary<string, IList<AOPAttribute>> GetAOPAttribute(IInvocation invocation)
{
// System.Reflection.MemberInfo info = invocation.TargetType;
Dictionary<string, IList<AOPAttribute>> dict = new Dictionary<string, IList<AOPAttribute>>();

Type type = invocation.TargetType;
AOPAttribute[] classAttribute = type.GetCustomAttributes(typeof(AOPAttribute), true) as AOPAttribute[];
dict.Add("class", classAttribute.ToList<AOPAttribute>());

var methodName = invocation.Method.Name;//.GetCustomAttributes(typeof(AOPAttribute), true) as AOPAttribute[];

IList<AOPAttribute> methodAttributeList = new List<AOPAttribute>();

MethodInfo[] methods = type.GetMethods();
foreach (MethodInfo item in methods)
{
if (item.Name == methodName)
{
AOPAttribute[] methodAttributes = item.GetCustomAttributes(typeof(AOPAttribute), true) as AOPAttribute[];
if (methodAttributes.Length != 0)
{ //&&! dict["method"].Contains(methodAttributes)
if (!dict.ContainsKey("method"))
{

dict.Add("method", methodAttributes.ToList<AOPAttribute>());
}
else
{

dict["method"]= methodAttributes.ToList<AOPAttribute>();
}

}
else
{
dict.Add("method", null);
}
}
}

return dict;
}

許可權設計Extjs

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.