/// <summary> /// 取得主視覺的內容 /// </summary> /// <param name="server"></param> /// <param name="mainAdvNodeId">主視覺設定檔代碼</param> /// <returns>主視覺的內容</returns> public static string GetMainAdvContent(HttpServerUtility server, int mainAdvNodeId) { string content = string.Empty; PostFactory postFactory = new PostFactory(); IPostService postService = postFactory.GetPostService(); NodeVO nodeVO = postService.GetNodeById(mainAdvNodeId); if (nodeVO != null) { if (nodeVO.UType == NodeVO.UnitType.Flash) { string advFile = server.MapPath("~/template/") + "main-adv-flash01.txt"; string fileContent = File.ReadAllText(advFile, System.Text.Encoding.UTF8); content = fileContent.Replace("(#FILENAME)", nodeVO.PicFileName); } //暫時不用圖片,僅flash //else if (nodeVO.UType == NodeVO.UnitType.Pic) //{ // string advFile = server.MapPath("~/template/") + "main-adv-pic01.txt"; // string fileContent = File.ReadAllText(advFile, System.Text.Encoding.UTF8); // content = fileContent.Replace("(#FILENAME)", nodeVO.PicFileName); //} } return content; }
protected void Page_Load(object sender, EventArgs e) { m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { LoadUI(); } }
protected void Page_Load(object sender, EventArgs e) { 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); } }
protected void Page_Load(object sender, EventArgs e) { m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); if (!Page.IsPostBack) { if (m_SessionHelper.LoginUser != null) { lblMsg.Text = m_SessionHelper.LoginUser.FullNameInChinese + "@" + HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] + " > 歡迎您再次登入!今天是民國" + (ConvertUtil.UtcDateTimeToTaiwanDateTime(DateTime.UtcNow).Year - 1911).ToString() + "年" + ConvertUtil.UtcDateTimeToTaiwanDateTime(DateTime.UtcNow).Month.ToString("00") + "月" + ConvertUtil.UtcDateTimeToTaiwanDateTime(DateTime.UtcNow).Day.ToString("00") + "日"; } IList<NodeVO> storeList = m_PostService.GetNodeListByParentName("店家"); ltlTitle.Text = string.Format("<title> 品讚行動通訊聯合系統-{0}</title>", storeList[0].Name); ltlTitle2.Text = string.Format("<品讚行動通訊聯合系統-{0}", storeList[0].Name); } }
public static string GetMainTopAdvPic(HttpServerUtility server, int m_PostId1) { string content = string.Empty; WebPageHelper webPageHelper = new WebPageHelper(); PostFactory postFactory = new PostFactory(); IPostService postService = postFactory.GetPostService(); PostVO podeVO = postService.GetPostById(m_PostId1); if (podeVO != null) { string advFile = server.MapPath("~/template/") + "main-adv-pic01.txt"; string fileContent = File.ReadAllText(advFile, System.Text.Encoding.UTF8); content = fileContent.Replace("(#FILENAME)", webPageHelper.GetContent(podeVO, "PicFileName")); } return content; }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { GetList(); ShowMode(); } }
protected void Page_Load(object sender, EventArgs e) { m_WebLogService = new WebLogService(); m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); if (!IsPostBack) { pnlContent.Visible = false; fillGridView(); ShowMode(); } }
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_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_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(); } }
public WebPageHelper() { m_PostFactory = new PostFactory(); m_PostService = m_PostFactory.GetPostService(); }
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(); }