標籤:
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