using System; using System.Web.UI; using System.Web.UI.WebControls; using Certis.Gepro.GepCore.DAL; using Certis.Gepro.Website.UserCommands; namespace Certis.Gepro.Website { public partial class Main : Page { protected string m_oMenuPath; protected string m_oMenuJsPath; protected string m_oLanguageInEnglish; protected string m_sDescription; protected string m_sKeywords; protected string m_sTitle; private string m_onglet1 = "general"; override protected void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.imgFrench.Command += new CommandEventHandler(this.imgFrench_Command); this.imgEnglish.Command += new CommandEventHandler(this.imgEnglish_Command); this.imgGerman.Command += new CommandEventHandler(this.imgGerman_Command); this.imgSpanish.Command += new CommandEventHandler(this.imgSpanish_Command); this.imgPortuguese.Command += new CommandEventHandler(this.imgPortuguese_Command); this.imgItalian.Command += new CommandEventHandler(this.imgItalian_Command); this.btnShowCart.Command += new CommandEventHandler(this.btnShowCart_Command); } private void LoadTexts() { string text; WebLocalSingleton oSingl = WebLocalSingleton.GetInstance(Context); GepCore.BLL.AbstractFactory ctrlFactory = GepCore.BLL.AbstractFactory.Factory; text = ctrlFactory.TextController.GetTextString(m_onglet1, "all", "meta_description", oSingl.CurrentLanguage); m_sDescription = text; text = ctrlFactory.TextController.GetTextString(m_onglet1, "all", "meta_keywords", oSingl.CurrentLanguage); m_sKeywords = text; text = ctrlFactory.TextController.GetTextString(m_onglet1, "all", "meta_title", oSingl.CurrentLanguage); m_sTitle = text; } protected override void OnPreRender(EventArgs e) { WebLocalSingleton oSingl = WebLocalSingleton.GetInstance(Context); CheckNavigationMenu(); LoadTexts(); /* //generate navigation and page title ContentPage page = (ContentPage)c; navCtrl = GepCore.BLL.AbstractFactory.Factory.NavigationController; string nav = navCtrl.GenerateNavigation(page.GetNavigation(), oSingl.CurrentLanguage, 1); lblNavigation.Text = nav; */ if (oSingl.CurrentOrderInfo == null) { new CreateNonLoggedEnvironment(Context); #if (DEBUG) // add an item in the cart if (oSingl.CurrentOrderInfo.itsOrderItems.Count == 0) { new AddProductToCart(Context, "CRA1", "1"); new AddProductToCart(Context, "DVD-M3", "2"); } #endif } #if (DEBUG) //display debug info: //current language string debug = ""; debug += "Language = " + oSingl.CurrentLanguage + ", "; debug += "Currency = " + oSingl.CurrentCurrency.Shortname; lblDebug.Text = debug; #endif m_oLanguageInEnglish = CoreConstants.LANGUAGE_TEXT_ENGLISH[oSingl.CurrentLanguage - 1]; m_oMenuPath = "menu/menu_" + m_oLanguageInEnglish + "/"; m_oMenuJsPath = "menu/menu_" + m_oLanguageInEnglish + "/menu_" + m_oLanguageInEnglish + ".js"; imgFrench.ImageUrl = GlobalAppl.ImagesPath + "drapeau/French.gif"; imgFrench.Height = 15; imgEnglish.ImageUrl = GlobalAppl.ImagesPath + "drapeau/English.gif"; imgEnglish.Height = 15; imgPortuguese.ImageUrl = GlobalAppl.ImagesPath + "drapeau/Portuguese.gif"; imgPortuguese.Height = 15; imgItalian.ImageUrl = GlobalAppl.ImagesPath + "drapeau/Italian.gif"; imgItalian.Height = 15; imgGerman.ImageUrl = GlobalAppl.ImagesPath + "drapeau/German.gif"; imgGerman.Height = 15; imgSpanish.ImageUrl = GlobalAppl.ImagesPath + "drapeau/Spanish.gif"; imgSpanish.Height = 15; btnShowCart.ImageUrl = GlobalAppl.ImagesPath + "btn-showcart_" + m_oLanguageInEnglish + ".gif"; imgFrench.Visible = true; imgEnglish.Visible = true; imgItalian.Visible = true; imgPortuguese.Visible = true; imgSpanish.Visible = true; imgGerman.Visible = true; base.OnPreRender(e); } private void CheckNavigationMenu() { //retrieve from navigation menu the page to display and run the corresponding command string pageName; if (Request.QueryString["page"] != null) { pageName = Request.QueryString["page"]; switch (pageName) { // HOMEPAGE IN DIFFERENT LANGUAGES case "MainFrench": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_FRENCH); break; case "MainSpanish": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_SPANISH); break; case "MainItalian": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_ITALIAN); break; case "MainGerman": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_GERMAN); break; case "MainPortuguese": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_PORTUGUESE); break; case "MainEnglish": new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_ENGLISH); break; // BOOKS case "Book": new ShowBook(Context); break; case "BookTerramorsi1": new ShowBookTerramorsi1(Context); break; case "BookBoudehen1": new ShowBookBoudehen1(Context); break; case "BookBoudehen2": new ShowBookBoudehen2(Context); break; // STAGES case "StagesManip": new ShowStagesManip(Context); break; case "StagesManipCollabos": new ShowStagesManipCollabos(Context); break; case "StagesManipBase": new ShowStagesManipBase(Context); break; case "StagesManipBaseGoal": new ShowStagesManipBaseGoal(Context); break; case "StagesManipBaseDesc": new ShowStagesManipBaseDesc(Context); break; case "StagesManipBaseProgr": new ShowStagesManipBaseProgr(Context); break; case "StagesManipBaseDate": new ShowStagesManipBaseDate(Context); break; case "StagesManipBaseWhere": new ShowStagesManipBaseWhere(Context); break; case "StagesManipBasePrice": new ShowStagesManipBasePrice(Context); break; case "StagesManipBaseInscription": new ShowStagesManipBaseInscription(Context); break; case "StagesManipBaseInscriptionSuisseFrancais": new ShowStagesManipBaseInscriptionSuisseFrancais(Context); break; case "StagesManipPostgrade": new ShowStagesManipPostgrade(Context); break; case "StagesManipRefresh": new ShowStagesManipRefresh(Context); break; case "StagesManipGepro2": new ShowStagesManipGepro2(Context); break; case "StagesDynam": new ShowStagesDynam(Context); break; case "StagesDynamGoal": new ShowStagesDynamGoal(Context); break; case "StagesDynamProgr": new ShowStagesDynamProgr(Context); break; case "StagesDynamDate": new ShowStagesDynamDate(Context); break; case "StagesDynamWhere": new ShowStagesDynamWhere(Context); break; case "StagesDynamPrice": new ShowStagesDynamPrice(Context); break; case "StagesDynamInscription": new ShowStagesDynamInscription(Context); break; case "StagesDynamPostgrade": new ShowStagesDynamPostgrade(Context); break; case "StagesTST": new ShowStagesTST(Context); break; case "StagesTSTGoal": new ShowStagesTSTGoal(Context); break; case "StagesTSTProgr": new ShowStagesTSTProgr(Context); break; case "StagesTSTDate": new ShowStagesTSTDate(Context); break; case "StagesTSTWhere": new ShowStagesTSTWhere(Context); break; case "StagesTSTPrice": new ShowStagesTSTPrice(Context); break; case "StagesTSTInscription": new ShowStagesTSTInscription(Context); break; case "StagesVisceral": new ShowStagesVisceral(Context); break; case "StagesVisceralGoal": new ShowStagesVisceralGoal(Context); break; case "StagesVisceralProgr": new ShowStagesVisceralProgr(Context); break; case "StagesVisceralDate": new ShowStagesVisceralDate(Context); break; case "StagesVisceralWhere": new ShowStagesVisceralWhere(Context); break; case "StagesVisceralPrice": new ShowStagesVisceralPrice(Context); break; case "StagesVisceralInscription": new ShowStagesVisceralInscription(Context); break; case "StagesForm": new ShowStagesForm(Context); break; //CONTACT case "ContactJacques": new ShowContact(Context, "txt_subject_contactJacques"); break; case "ContactStagesDynam": new ShowContact(Context, "txt_subject_contactStagesDynam"); break; case "ContactStagesManip": new ShowContact(Context, "txt_subject_contactStagesManip"); break; case "ContactStagesManipInscriptionSuisseFrancais": new ShowContact(Context, "txt_subject_contactStagesManipInscriptionSuisseFrancais"); break; case "ContactRebateNotFound": new ShowContact(Context, "txt_subject_contactRebate"); break; case "Contact": new ShowContact(Context, "txt_subject_contactform"); break; //CRANES case "CraAss": new ShowCraAss(Context); break; case "CraAst": new ShowCraAst(Context); break; case "CraDes": new ShowCraDes(Context); break; case "CraIso": new ShowCraIso(Context); break; //DVD case "DvdGeneral": new ShowDvdGeneral(Context); break; case "DvdCraAut": new ShowDvdCraAut(Context); break; case "DvdCraPri": new ShowDvdCraPri(Context); break; case "DvdDemo": new ShowDvdDemo(Context); break; case "DvdMovies": new ShowDvdMovies(Context); break; case "DvdDemoChoice": new ShowDvdDemoChoice(Context); break; case "DvdCraDvd": new ShowDvdCraDvd(Context); break; case "DvdVertAut": new ShowDvdVertAut(Context); break; case "DvdVertPri": new ShowDvdVertPri(Context); break; case "DvdVertDvd": new ShowDvdVertDvd(Context); break; case "OrderDvdDemo": new AddProductToCart(Context, "DVDDEMO", "1"); new ShowCart(Context, true); break; //VARIOUS case "OrderForm": new ShowOrderForm(Context); break; case "Training": new ShowTraining(Context); break; case "Cart": new ShowCart(Context); break; case "Links": new ShowLinks(Context); break; case "GroupedOrder": new ShowContactGroupedOrder(Context); break; case "PaymentSuccess": new ShowCartCreditCardSuccess(Context); break; case "PaymentFailure": new ShowCartCreditCardFailure(Context); break; default: new ShowStartPageCommand(Context); break; } } } private void imgFrench_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_FRENCH); } private void imgEnglish_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_ENGLISH); } private void imgGerman_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_GERMAN); } private void imgSpanish_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_SPANISH); } private void imgPortuguese_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_PORTUGUESE); } private void imgItalian_Command(object sender, CommandEventArgs e) { new ChangeApplicationLanguage(Context, CoreConstants.LANGUAGE_ITALIAN); } private void btnShowCart_Command(object sender, CommandEventArgs e) { new ShowCart(Context); } } }
cheap oakley www.2014oakleysunglasses.com nike スニーカー www.securebarrier.com ダンヒル 財布