protected void Page_Load(object sender, EventArgs e) { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberFactory = new MemberFactory(); m_MemberService = m_MemberFactory.GetMemberService(); }
public void FillLog(object sender, EventArgs e) { HttpApplication application = (HttpApplication)sender; string rawUrl = application.Request.RawUrl; rawUrl = rawUrl.ToLower(); //只欄aspx if (rawUrl.IndexOf(".aspx") == -1) { return; } if (rawUrl.IndexOf("schema.aspx") != -1) { return; } //將function Name存入log if (!string.IsNullOrEmpty(rawUrl)) { string path = rawUrl; string phypath = application.Request.ApplicationPath.ToLower(); if (!string.IsNullOrEmpty(phypath) && !phypath.Equals("/")) { path = path.Replace(phypath, ""); } if (path.StartsWith("/")) { path = path.Substring(1); } AuthFactory authFactory = new AuthFactory(); IAuthService authService = authFactory.GetAuthService(); IList<MenuFuncVO> menuFuncList = authService.GetMenuFuncList("as vo where vo.MainPath='" + path + "'", 0, 1); //checkMainPath if (menuFuncList != null && menuFuncList.Count > 0) { FillLog(menuFuncList[0]); } ////check functionPath //IList<FunctionPathVO> fpaths = authService.DaoGetByWhere<FunctionPath>("as vo where vo.Path='" + path + "'", 0, 1); //if (fpaths != null && fpaths.Count > 0) //{ // FillLog(fpaths[0].BelongMenuFunc); //} } }
protected void Page_Load(object sender, EventArgs e) { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); if (!Page.IsPostBack) { // setPrgName(); } }
protected void Page_Load(object sender, EventArgs e) { m_SystemFactory = new SystemFactory(); m_AuthFactory = new AuthFactory(); m_LogService = m_SystemFactory.GetLogService(); m_AuthSevice = m_AuthFactory.GetAuthService(); if (!Page.IsPostBack) { InitData(); fillGridView(); } }
protected void Page_Load(object sender, EventArgs e) { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberFactory = new MemberFactory(); m_MemberService = m_MemberFactory.GetMemberService(); m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { IList<NodeVO> storeList = m_PostService.GetNodeListByParentName("店家"); ltlTitle.Text = string.Format("<title> 品讚行動通訊聯合系統-{0}</title>", storeList[0].Name); ltlTitle2.Text = string.Format("<品讚行動通訊聯合系統-{0}", storeList[0].Name); } }
protected void Page_Load(object sender, EventArgs e) { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); if (!Page.IsPostBack) { initMenu(); new TreeViewState().RestoreTreeView(tvMenu, this.GetType().ToString()); //初始選單下方左邊資料 initLeftData(); } }
public TreeveiwService() { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); }
protected void Page_Load(object sender, EventArgs e) { m_ConfigHelper = new ConfigHelper(); m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_AuthFactory = new AuthFactory(); m_CommonFactory = new CommonFactory(); m_SessionHelper = new SessionHelper(); m_WebUtility = new WebUtility(); m_AuthService = m_AuthFactory.GetAuthService(); m_PostFileService = m_PostFactory.GetPostFileService(); m_CommonService = m_CommonFactory.GetCommonService(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { pnlContent.Visible = false; fillGridView(); ShowMode(); } }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); if (!IsPostBack) { LoadDataToUI(); } }
protected void Page_Load(object sender, EventArgs e) { m_ConfigHelper = new ConfigHelper(); m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_MemberFactory = new MemberFactory(); m_AuthFactory = new AuthFactory(); m_HttpHelper = new HttpHelper(); m_SessionHelper = new SessionHelper(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberService = m_MemberFactory.GetMemberService(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { pnlContent.Visible = false; fillGridView(); ShowMode(); InitDDL(); } }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); string userId = Request.QueryString["UserId"]; if (!Page.IsPostBack) { initData(userId); } }
/// <summary> /// 檢查權限 /// </summary> /// <param name="application"></param> /// <param name="uri"></param> /// <param name="rawUrl"></param> private void CheckAuth(HttpApplication application, Uri uri, string rawUrl) { SessionHelper sHelper = new SessionHelper(); LoginUserVO loginUser = sHelper.LoginUser; string applicationPath = application.Request.ApplicationPath; string mamagePath = String.IsNullOrEmpty(applicationPath) ? "/admin" : applicationPath + "/admin"; mamagePath = mamagePath.Replace("//", "/"); if (rawUrl.StartsWith(mamagePath) == true) { AuthFactory authFactory = new AuthFactory(); IAuthService authService = authFactory.GetAuthService(); if (loginUser == null) { toLoginPage(application.Response); return; } string userId = loginUser.UserId; //判斷只有主路徑是否有權限 //if (!PathHasRight(UserMenuFuncContainer.GetInstance().GetUser(userId), uri, UserMenuFuncContainer.GetInstance().PathFunc)) //{ // toLoginNoAuthPage(application.Response); //} //判斷所有路徑是否有權限 if (!authService.PathHasAuth(UserMenuFuncContainer.GetInstance().GetUser(userId), uri)) { toLoginNoAuthPage(application.Response); } } }
private void FillLog(MenuFuncVO m) { AuthFactory authFactory = new AuthFactory(); IAuthService authService = authFactory.GetAuthService(); MenuFuncVO parentMenu = authService.GetMenuFuncById(m.ParentMenu.MenuFuncId); string functionName = parentMenu.MenuFuncName; string subfunctionName = m.MenuFuncName; m_Log.Debug("functionName:" + functionName + " >> " + m.MenuFuncName); SessionHelper sessionHelper = new SessionHelper(); LogSystemVO logSystemVO = new LogSystemVO(); logSystemVO.Fucntion = functionName; logSystemVO.SubFucntion = subfunctionName; sessionHelper.LogVO = logSystemVO; }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); }
protected void Page_Load(object sender, EventArgs e) { m_ConfigHelper = new ConfigHelper(); m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_MemberFactory = new MemberFactory(); m_AuthFactory = new AuthFactory(); m_HttpHelper = new HttpHelper(); m_SessionHelper = new SessionHelper(); m_AccountingFactory = new AccountingFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberService = m_MemberFactory.GetMemberService(); m_PostService = m_PostFactory.GetPostService(); m_AccountingService = m_AccountingFactory.GetAccountingService(); if (!IsPostBack) { InitDDL(); ShowMode(); fillGridView(); new Thread(new ThreadStart(ApiUtil.UpdateMemberToServer)).Start(); new Thread(new ThreadStart(() => ApiUtil.UpdateFileToServer(Server.MapPath("../../App_Data/upload/")))).Start(); new Thread(new ThreadStart(() => ApiUtil.UpdatePostToServer(2))).Start(); //LoadTotalCommission(); } }
public void TestCaseInit() { m_AuthFactory = new AuthFactory(); m_PostFactory = new PostFactory(); m_SystemFactory = new SystemFactory(); m_StorageFactory = new StorageFactory(); m_MemberFactory = new MemberFactory(); m_AccountingFactory = new AccountingFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_PostService = m_PostFactory.GetPostService(); m_TemplateService = m_SystemFactory.GetTemplateService(); m_SystemService = m_SystemFactory.GetSystemService(); m_MessageService = m_PostFactory.GetMessageService(); m_StorageFileService = m_StorageFactory.GetStorageFileService(); m_MemberService = m_MemberFactory.GetMemberService(); m_AccountingService = m_AccountingFactory.GetAccountingService(); }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_MemberFactory = new MemberFactory(); m_AuthFactory = new AuthFactory(); m_HttpHelper = new HttpHelper(); m_SessionHelper = new SessionHelper(); m_AccountingFactory = new AccountingFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberService = m_MemberFactory.GetMemberService(); m_PostService = m_PostFactory.GetPostService(); m_AccountingService = m_AccountingFactory.GetAccountingService(); if (!IsPostBack) { ////先更新到今天之前的結帳 m_AccountingService.UpdateCash(); txtDate.Text = ConvertUtil.UtcDateTimeToTaiwanDateTime(DateTime.UtcNow).ToString("yyyy/MM/dd"); ShowMode(); LoadDataToUI(); } }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); //載入清單 LoadDataToUI(); //新增模式 ToInsertMode(); }