using System; using System.Reflection; using System.Web; using System.Web.SessionState; namespace SiteCore.Handler { public partial class sync2 : BaseHandler, IHttpHandler, IRequiresSessionState { public void ProcessRequest(HttpContext context) { //if (CurrentUser == null) //{ // ReturnLoginMsg("操作己过期,请重新登录!"); // return; //} con = context; String methodName = GetString("t"); Type type = this.GetType(); MethodInfo method = type.GetMethod(methodName); if (method == null) throw new Exception("method is null"); if (methodName.IndexOf("get_") == -1) { //using (new SessionScope()) //{ try { method.Invoke(this, null); //if (operate_Tag != "") WebLog.SysLog(CurrentUser.UserID,operate_Tag); //else WebLog.SysLog(CurrentUser.UserID, methodName); } catch (Exception ex) { //WebLog.SysLog(CurrentUser.UserID, ex); returnErrorMsg("操作失败!" + ex.Message); } //} } else { try { method.Invoke(this, null); } catch (Exception ex) { //XLog.SaveLog(CurrentUser.UserID, ex.Message); returnErrorMsg("操作失败!" + ex.Message); } } } } }