コード例 #1
0
 /// <summary>
 /// 權限人員查看   add by zhuoqin0830w  2015/07/06
 /// </summary>
 /// <returns></returns>
 public JsonResult GetPrivilege()
 {
     List<FunctionCustom> functions = new List<FunctionCustom>();
     try
     {
         Function function = new Function();
         if (!string.IsNullOrEmpty(Request.Form["functionId"]))
         {
             function.RowId = Convert.ToInt32(Request.Form["functionId"]);
         }
         functionMgr = new FunctionMgr(connectionString);
         functions = functionMgr.GetUserById(function);
     }
     catch (Exception ex)
     {
         Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
         logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
         logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
         log.Error(logMessage);
     }
     return Json(functions);
 }