protected void Page_Load(object sender, EventArgs e) { Session["bodyid"] = "credits"; IncludePage(FinancialEditInc, Resources.Resource.incFinancialOverview); IncludePage(RhosMovementInc, Resources.Resource.incRhosMovement2); using (Database db = new MySqlDatabase()) { UserInfo ui = db.GetUser(Util.UserId); ClientInfo ci = db.GetClientInfo(Util.UserId); DataSet ds = db.GetRegister(Util.UserId); int protectedTracks = ds.Tables[0].Rows.Count; LoggedOnTitle.Text = Resources.Resource.LoggedOnTitle; LoggedOnUserName.Text = string.Format("<span><b>{0}</b></span>", ci.FirstName);// ci.GetFullName()); CreditsLiteral.Text = Util.GetUserCredits(Util.UserId).ToString(); ProtectedLiteral.Text = protectedTracks.ToString(); decimal percentComplete = 0m; if (Session["percentComplete"] != null) percentComplete = Convert.ToDecimal(Session["percentComplete"]); CompletedLiteral.Text = string.Empty; if (percentComplete < 100) CompletedLiteral.Text = string.Format(Resources.Resource.PercentComplete, percentComplete / 100m); divAccPerCompleted.Visible = ClickToLinkLiteral.Visible = (CompletedLiteral.Text != string.Empty); } if (!IsPostBack) { if (Session["culture"] != null) _culture = Session["culture"] as string; long userId = Util.UserId; string passwd = Session["access"] as string; List<CreditHistory> creditHistory = null; using (Database db = new MySqlDatabase()) { _userDocumentPath = db.GetUserDocumentPath(userId, passwd); creditHistory = db.GetCreditHistory(userId); } dlMyTracks.DataSource = creditHistory; dlMyTracks.DataBind(); //Transactions transactions = Util.GetTransactions(Util.UserId); AddHeaders(FinancialOverviewTable); //foreach (Transaction transaction in transactions) //{ // AddTransaction(FinancialOverviewTable, transaction); //} foreach (CreditHistory ch in creditHistory) { AddCreditHistory(FinancialOverviewTable, ch); } AddFooters(FinancialOverviewTable); } //------- Highlight the selected lang button ------- ! if (Convert.ToString(Session["culture"]).Contains("nl")) { ClientScript.RegisterStartupScript(this.GetType(), "HighLightLangBtn", "HighLightLangBtn('" + "ctl00_HeadLoginView_LanguageNL" + "');", true); ClientScript.RegisterStartupScript(this.GetType(), "UnHighLightLangBtn", "UnHighLightLangBtn('" + "ctl00_HeadLoginView_LanguageUS" + "');", true); } else { ClientScript.RegisterStartupScript(this.GetType(), "HighLightLangBtn", "HighLightLangBtn('" + "ctl00_HeadLoginView_LanguageUS" + "');", true); ClientScript.RegisterStartupScript(this.GetType(), "UnHighLightLangBtn", "UnHighLightLangBtn('" + "ctl00_HeadLoginView_LanguageNL" + "');", true); } }