private void TourMoreSearchResultForm_InitializeControls(object sender, EventArgs e)
    {
        try
        {
            using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\SearchTour3" + DateTime.Now.ToString("MMddyyyyHHmmss") + ".txt"))
            {
                sw.Write("Star");
            }
        }
        catch
        {
        }

        if (IsSearchConditionNull)
        {
            Response.Redirect("~/ErrorPages/GenericErrorPage.aspx", true);
        }

        this.Transaction.IntKey = Convert.ToInt32(Request.Params["ConditionID"]);
        tourMerchandise.LanguageFlag = UserCulture.Name;
        Page.Session["IsSelectDate"] = null;
        Master.StepNumber = 2;
        Master.IsShowBookingManage = false;
        Master.IsShowModifySearch = false;
        this.SetWebSiteInfomation();
        try
        {
            if (!IsPostBack)
            {
                if (!IsSearchConditionNull)
                {
                    //Log
                    TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour More Search Result From:");
                    tlLoad.Start();

                    Initial();

                    //log
                    tlLoad.Stop();
                    PageUtility.TourSearchingTimeLog.Info(tlLoad);
                }
            }
        }
        catch (Exception ex)
        {
            string str = ex.Message;
        }

        if (lblArea.Text != "" && Utility.IsTourMore )
        {
            string Area = lblArea.Text;
            if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_EestCoast.ToString())
                divECBuy2Get1Free.Visible = true;
            if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_WestCoast.ToString())
                divWCBuy2Get1Free.Visible = true;
            if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_Hawaii.ToString())
                divHCBuy2Get1Free.Visible = true;
        }

        if (!IsPostBack)
        {
            if (!IsSearchConditionNull)
            {
                //如果Session国旗或者Utility.Transaction.Difference为空  Add zyl 2009-8-18
                Utility.Transaction.Difference.To = "Page List";
                Utility.Transaction.Difference.ToTime = DateTime.Now;
                Utility.Transaction.Difference.EndTime = DateTime.Now;
                log.Debug(Utility.Transaction.Difference.DiffList);
            }
        }

        try
        {
            using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\SearchTour4" + DateTime.Now.ToString("MMddyyyyHHmmss") + ".txt"))
            {
                sw.Write("Star");
            }
        }
        catch
        {
        }
    }
    private void NewTourMoreSearchResultForm_InitializeControls(object sender, EventArgs e)
    {
        if (IsSearchConditionNull)
        {
            Response.Redirect("~/ErrorPages/GenericErrorPage.aspx", true);
        }

        this.Transaction.IntKey = Convert.ToInt32(Request.Params["ConditionID"]);
        tourMerchandise.LanguageFlag = UserCulture.Name;
        Page.Session["IsSelectDate"] = null;
        Master.StepNumber = 2;
        Master.IsShowBookingManage = false;
        Master.IsShowModifySearch = false;
        this.SetWebSiteInfomation();
        try
        {
            if (!IsPostBack)
            {
                if (!UserCulture.Name.Contains("zh-CN"))
                {
                    if (Request["Preference"] != null)
                    {
                        hdPreference.Value = Request["Preference"];

                        if (hdPreference.Value == "1")
                        {
                            ibtnPreference.ImageUrl = @"http://www.majestic-vacations.com/images/Return-to-China-tours.gif";
                        }
                        else
                        {
                            ibtnPreference.ImageUrl = @"http://www.majestic-vacations.com/images/Return-to-english-tours.gif";
                        }
                    }
                }

                if (!IsSearchConditionNull)
                {
                    //Log
                    TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour More Search Result From:");
                    tlLoad.Start();

                    Initial();

                    //log
                    tlLoad.Stop();
                    PageUtility.TourSearchingTimeLog.Info(tlLoad);
                }
            }
        }
        catch (Exception ex)
        {
            string str = ex.Message;
        }

        //if (lblArea.Text != "" && Utility.IsTourMore )
        //{
        //    string Area = lblArea.Text;
        //    if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_EestCoast.ToString())
        //        divECBuy2Get1Free.Visible = true;
        //    if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_WestCoast.ToString())
        //        divWCBuy2Get1Free.Visible = true;
        //    if (Area.ToUpper().Replace(" ", "") == Global.Tour_Area_Hawaii.ToString())
        //        divHCBuy2Get1Free.Visible = true;
        //}

        if (!IsPostBack)
        {
            if (!IsSearchConditionNull)
            {
                //���Session�������Utility.Transaction.Difference��  Add zyl 2009-8-18
                Utility.Transaction.Difference.To = "Page List";
                Utility.Transaction.Difference.ToTime = DateTime.Now;
                Utility.Transaction.Difference.EndTime = DateTime.Now;
            }
        }

        try
        {
            using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\SearchTour4" + DateTime.Now.ToString("MMddyyyyHHmmss") + ".txt"))
            {
                sw.Write("Star");
            }
        }
        catch
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.SetWebSiteInfomation();
        if (!IsPostBack)
        {
            //Log
            TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour Index From:");
            tlLoad.Start();

            TourXml = ReadXML();
            this.dlTours.DataSource = CheckTourType(TourXml);
            this.dlTours.DataBind();

            TourXml1 = ReadXML1();
            this.dlTours1.DataSource = CheckTourType(TourXml1);
            this.dlTours1.DataBind();

            CheckTourInfo();//��������Ƿ���Tour��Ϣ;
            Utility.SetTourLandOnlyCitys = ReadCityXML();

            //log
            tlLoad.Stop();
            PageUtility.TourSearchingTimeLog.Info(tlLoad);
        }

        string TourCode = Request.QueryString["Code"];

        if (!string.IsNullOrEmpty(TourCode))
            RedirectToTourDetailForm(TourCode);

        string AreaName = Request.QueryString["Area"];

        if (!string.IsNullOrEmpty(AreaName))
            RedirectToTourMoreForm(AreaName);
    }
    private void NewTourSearchEngineerListForm_InitializeControls(object sender, EventArgs e)
    {
        if (IsSearchConditionNull)
        {
            Response.Redirect("~/ErrorPages/GenericErrorPage.aspx", true);
        }

        this.Transaction.IntKey = Convert.ToInt32(Request.Params["ConditionID"]);
        tourMerchandise.LanguageFlag = UserCulture.Name;
        Page.Session["IsSelectDate"] = null;

        this.SetWebSiteInfomation();
        try
        {
            if (!IsPostBack)
            {
                if (!UserCulture.Name.Contains("zh-CN"))
                {
                    if (Request["Preference"] != null)
                    {

                    }
                }

                if (!IsSearchConditionNull)
                {
                    //Log
                    TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour More Search Result From:");
                    tlLoad.Start();

                    Initial();

                    //log
                    tlLoad.Stop();
                    PageUtility.TourSearchingTimeLog.Info(tlLoad);
                }
            }
        }
        catch (Exception ex)
        {
            string str = ex.Message;
        }

        if (!IsPostBack)
        {
            if (!IsSearchConditionNull)
            {
                //���Session�������Utility.Transaction.Difference��  Add zyl 2009-8-18
                Utility.Transaction.Difference.To = "Page List";
                Utility.Transaction.Difference.ToTime = DateTime.Now;
                Utility.Transaction.Difference.EndTime = DateTime.Now;
            }
        }

        try
        {
            using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\SearchTour4" + DateTime.Now.ToString("MMddyyyyHHmmss") + ".txt"))
            {
                sw.Write("Star");
            }
        }
        catch
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Transaction.IntKey = Convert.ToInt32(Request.Params["ConditionID"]);
        Master.StepNumber = 2;
        Master.IsShowBookingManage = false;
        Master.IsShowModifySearch = true;
        CurrentItineraryControl.IsShowPart2 = true;
        CurrentItineraryControl.IsShowPrint = true;
        //CurrentItineraryControl.SelectTourIndex = tourMerchandise.DefaultNumber;
        Page.Session["IsSelectDate"] = null;

        try
        {
            if (!Page.IsPostBack)
            {
                Session["MaxMonthNumber"] = 6;

                //Log
                TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour Select From:");
                tlLoad.Start();

                Initial();

                //log
                tlLoad.Stop();
                PageUtility.TourSearchingTimeLog.Info(tlLoad);
            }

            //SearchToBinder();
        }
        catch (Exception ex)
        {
            string str = ex.Message;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //Log
        this.Transaction.IntKey = Convert.ToInt32(Request.Params["ConditionID"]);

        TurboTT.Log.Core.TimeLog tlLoad = new TurboTT.Log.Core.TimeLog(PageUtility.TourLogRandomNumber.ToString() + "Load Tour Select Air From:");

        Header1.Path = "../../";

        if (!IsPostBack)
            tlLoad.Start();

        this.StatesControl1.PageCode = 2;
        if (Utility.IsLogin)
        {

            this.divSignIn.Visible = false;
            this.P_table.Visible = true;
        }
        else
        {
            UserLoginControl1.NextUrl = "~/Page/Tour/TourTravelerInfoForm.aspx";
            UserLoginControl1.ReturnUrl = "~/Page/Tour/TourSelectAirForm.aspx";

            this.divSignIn.Visible = true;
            this.P_table.Visible = false;
        }

        UserLoginControl1.loginClick = DoContinueProcess;
        UserLoginControl1.CheckPassNumber = Check;
        if (!IsSearchConditionNull)
        {
            //����ж�Utility.Transaction.CurrentTransactionObject.Items �Ƿ����������Ƿ����0���ж� Add zyl 2009-8-18
            if (Utility.Transaction.CurrentTransactionObject != null && Utility.Transaction.CurrentTransactionObject.Items != null && Utility.Transaction.CurrentTransactionObject.Items.Count > 0)
            {
                if (((TourOrderItem)Utility.Transaction.CurrentTransactionObject.Items[0]).InsuranceMaterial == null)
                    PriceInfoControl1.IsTourInsurance = false;
                else
                    PriceInfoControl1.IsTourInsurance = true;
            }
            else
            {
                PriceInfoControl1.IsTourInsurance = false;
            }
        }
        try
        {
            if (!IsPostBack)
            {
               Initial();
            }

            //SearchToBinder();
        }
        catch (Exception ex)
        {
            string str = ex.Message;
        }

        if (!IsPostBack)
        {
            //log
            tlLoad.Stop();
            PageUtility.TourSearchingTimeLog.Info(tlLoad);
        }
    }