root/branches/ErrorLog/eCard/Platnosci/MasterPage.master.cs @ 763

Wersja 477, 1.5 KB (wprowadzona przez marek, 17 years temu)

re #139

Line 
1using System;
2using System.Data;
3using System.Configuration;
4using System.Collections;
5using System.Web;
6using System.Web.Security;
7using System.Web.UI;
8using System.Web.UI.WebControls;
9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11using System.Threading;
12
13public partial class MasterPage : System.Web.UI.MasterPage
14{
15    protected void Page_Load(object sender, EventArgs e)
16    {
17        if ((string)Session["culture"] == "pl-PL")
18        {
19            this.ImageButton1.Enabled = false;
20        }
21        if ((string)Session["culture"] == "en-US")
22        {
23            this.ImageButton2.Enabled = false;
24        }
25    }   
26
27    protected void FlagaPL_Click(object sender, EventArgs e)
28    {
29        if (Thread.CurrentThread.CurrentCulture.Name == "en-US")
30        {
31            Session["culture"] = "pl-PL";
32            string zapytanie = Request.QueryString.ToString();
33            if (zapytanie != "") { zapytanie = "?" + zapytanie; }
34            Response.Write(zapytanie);
35            Response.Redirect(Request.Url.LocalPath + zapytanie);
36        }   
37       
38    }
39
40    protected void FlagaGB_Click(object sender, EventArgs e)
41    {
42        if (Thread.CurrentThread.CurrentCulture.Name == "pl-PL")
43        {
44            Session["culture"] = "en-US";
45            string zapytanie = Request.QueryString.ToString();
46            if (zapytanie != "") { zapytanie = "?" + zapytanie; }
47            Response.Redirect(Request.Url.LocalPath + zapytanie);
48        }   
49
50    }
51}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.