Exemple #1
0
 /// <summary>
 /// 获取用户
 /// </summary>
 public static User GetUser(string Uid)
 {
     User u = null;
     string AppID = System.Configuration.ConfigurationManager.AppSettings["AppID"];
     AccessClient client = new AccessClient();
     try
     {
         client.Open();
         u = client.GetCurrentUser(Convert.ToInt32(AppID), Uid);
     }
     catch (Exception ex)
     {
         HttpContext.Current.Response.Redirect("~/Home/Msg/AccessIssue");
     }
     finally
     {
         client.Close();
     }
     return u;
 }
Exemple #2
0
 /// <summary>
 /// 日志
 /// </summary>
 public static bool LogAdd(string Action, string Description)
 {
     string AppID = System.Configuration.ConfigurationManager.AppSettings["AppID"];
     AccessClient client = new AccessClient();
     try
     {
         client.Open();
         return client.LogAdd(Convert.ToInt32(AppID), CurrentLogonUser.Uid, System.Web.HttpContext.Current.Request.Url.ToString(), Action, Description);
     }
     catch (Exception ex)
     {
         return false;
     }
     finally
     {
         client.Close();
     }
 }