本文整理汇总了C#中MySqlDatabase.GetUser方法的典型用法代码示例。如果您正苦于以下问题:C# MySqlDatabase.GetUser方法的具体用法?C# MySqlDatabase.GetUser怎么用?C# MySqlDatabase.GetUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySqlDatabase
的用法示例。
在下文中一共展示了MySqlDatabase.GetUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Params["pid"] != null)
{
long productId;
if (!long.TryParse(Request.Params["pid"], out productId))
productId = 0;
Session["quotation.pid"] = productId;
}
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 = string.Format(Resources.Resource.spnCredits, Util.GetUserCredits(Util.UserId));
ProtectedLiteral.Text = string.Format(Resources.Resource.spnProtected, protectedTracks);
string userDocPath = db.GetUserDocumentPath(ui.UserId, Session["access"] as string);
decimal percentComplete = DetermineCompletion(userDocPath, ui, ci);
CompletedLiteral.Text = string.Empty;
if (percentComplete < 100)
CompletedLiteral.Text = string.Format(Resources.Resource.PercentComplete, percentComplete / 100m);
ClickToLinkLiteral.Visible = (CompletedLiteral.Text != string.Empty);
}
}
示例2: AddCoArtist
protected void AddCoArtist(object sender, CommandEventArgs e)
{
bool found = false;
if (CoArtistDropDown.SelectedIndex < 0)
return;
using (Database db = new MySqlDatabase())
{
long userId = Convert.ToInt64(CoArtistDropDown.SelectedValue);
if (userId > 0)
{
UserInfo ui = db.GetUser(userId);
ClientInfo ci = db.GetClientInfo(userId);
Session["user.userid"] = userId;
AddCoArtistRow(CoArtistsTable, ci.GetFullName(), CoArtistRole.Text, ci.ClientId);
DataView dataView = new DataView(CoArtistsTable);
CoArtistsList.DataSource = dataView;
CoArtistsList.DataBind();
found = true;
}
}
if (!found)
ErrorMessage.Text = Resources.Resource.ClientNotFound;
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
IncludePage(HowItWorksInc, Resources.Resource.incHowItWorks);
IncludePage(ProtectInc, Resources.Resource.incProtect);
IncludePage(RhosMovementInc, Resources.Resource.incRhosMovement);
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 = string.Format(Resources.Resource.spnCredits, Util.GetUserCredits(Util.UserId));
ProtectedLiteral.Text = string.Format(Resources.Resource.spnProtected, protectedTracks);
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);
ClickToLinkLiteral.Visible = (CompletedLiteral.Text != string.Empty);
}
if (!IsPostBack)
{
}
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Session["bodyid"] = "relationships";
IncludePage(ProtectInc, Resources.Resource.incProtect);
IncludePage(RhosMovementInc, Resources.Resource.incRhosMovement2);
string fullname = string.Empty;
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;
fullname = ci.FirstName; //ci.GetFullName();
LoggedOnTitle.Text = Resources.Resource.LoggedOnTitle;
LoggedOnUserName.Text = string.Format("<span><b>{0}</b></span>", fullname);
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);
}
string email = Request.Params["email"] ?? "???";
string format = Resources.Resource.fmtInviteSuccess;
if (Request.Params["mode"] != null)
{
if (Request.Params["mode"] == "1")
format = Resources.Resource.fmtInviteExists;
}
InviteSuccessLiteral.Text = string.Format(format, email);
if (!IsPostBack)
{
}
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);
}
}
示例5: TpIdSearch
protected void TpIdSearch(object sender, CommandEventArgs e)
{
string email = TpIdText.Text;
using (Database db = new MySqlDatabase())
{
long userId = db.GetUserIdByEmail(email);
UserInfo ui = db.GetUser(userId);
ClientInfo ci = db.GetClientInfo(userId);
Session["mgmt.userid"] = userId;
ManagerNameLabel.Text = ci.GetFullName();
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
IncludePage(AccountOverviewInc, Resources.Resource.incMemberHome);
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 = string.Format(Resources.Resource.spnCredits, Util.GetUserCredits(Util.UserId));
ProtectedLiteral.Text = string.Format(Resources.Resource.spnProtected, protectedTracks);
string userDocPath = db.GetUserDocumentPath(ui.UserId, Session["access"] as string);
decimal percentComplete = DetermineCompletion(userDocPath, ui, ci);
Session["percentComplete"] = percentComplete;
CompletedLiteral.Text = string.Empty;
if (percentComplete < 100)
CompletedLiteral.Text = string.Format(Resources.Resource.PercentComplete, percentComplete / 100m);
ClickToLinkLiteral.Visible = (CompletedLiteral.Text != string.Empty);
}
FillAccountInformation();
int couponEntry = 0;
if (Session["coupon.entry"] != null)
couponEntry = (int)Session["coupon.entry"];
if (!IsPostBack)
{
using (Database db = new MySqlDatabase())
{
int violationState = db.GetUserWhmcsClientId(Util.UserId);
if (violationState == 1)
couponEntry = 3;
}
}
}
catch (Exception ex)
{
Logger.Instance.Write(LogLevel.Error, ex, "AccountOverView<Exception>");
}
}
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Session["bodyid"] = "relationships";
Session["loggedinUserEmail"] = string.Empty;
Util.GetUserClearanceLevels(Util.UserId, out _vcl, out _ecl);
if (_vcl < 100 && _ecl < 100)
{
divManaccChk.Visible = false;
}
else
{
divManaccChk.Visible = true;
}
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;
Session["loggedinUserEmail"] = ui.Email;
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);
}
//------- 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);
ddl_Language.SelectedValue = "nl";
}
else
{
ClientScript.RegisterStartupScript(this.GetType(), "HighLightLangBtn", "HighLightLangBtn('" + "ctl00_HeadLoginView_LanguageUS" + "');", true);
ClientScript.RegisterStartupScript(this.GetType(), "UnHighLightLangBtn", "UnHighLightLangBtn('" + "ctl00_HeadLoginView_LanguageNL" + "');", true);
ddl_Language.SelectedValue = "en";
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Session["bodyid"] = "tracks";
IncludePage(SelectProductInc, Resources.Resource.incSelectProduct);
IncludePage(RhosMovementInc, Resources.Resource.incRhosMovement2);
long userId = Util.UserId;
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);
}
getProductList(userId);
SetProductItemLinks();
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);
}
}
示例9: ArtistsTable_RowCommand
protected void ArtistsTable_RowCommand(object sender, GridViewCommandEventArgs e)
{
int rowIndex = Convert.ToInt32(e.CommandArgument);
// Retrieve the row that contains the button
// from the Rows collection.
GridViewRow row = ArtistsTable.Rows[rowIndex];
HiddenField hfd = row.FindControl("HiddenFieldUserId") as HiddenField;
switch (e.CommandName)
{
case "DeleteUser":
if (hfd != null)
{
long targetId = 0;
if (!long.TryParse(hfd.Value, out targetId))
targetId = 0;
if (targetId > 0)
{
long sourceId = Util.UserId;
using (Database db = new MySqlDatabase())
{
db.DeleteRelation(sourceId, targetId, 1);
}
}
}
break;
case "RelateUser":
if (hfd != null)
{
long targetId = 0;
if (!long.TryParse(hfd.Value, out targetId))
targetId = 0;
if (targetId > 0)
{
long sourceId = Util.UserId;
using (Database db = new MySqlDatabase())
{
UserInfo targetUi = db.GetUser(targetId);
RequestConfirmation(targetUi.Email, 1);
}
}
}
break;
}
FillManagedRelationsTable();
}
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
IncludePage(FAQInc, Resources.Resource.incFAQ);
//IncludePage(ProtectInc, Resources.Resource.incProtect);
//IncludePage(RhosMovementInc, Resources.Resource.incRhosMovement);
UserInformation();
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 = string.Format(Resources.Resource.spnCredits, Util.GetUserCredits(Util.UserId));
CreditsLiteral.Text = Convert.ToString(Util.GetUserCredits(Util.UserId));
//ProtectedLiteral.Text = string.Format(Resources.Resource.spnProtected, protectedTracks);
ProtectedLiteral.Text = Convert.ToString(protectedTracks);
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);
}
//------- 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);
}
ClientScript.RegisterStartupScript(this.GetType(), "HighLightMenu", "HighLightMenu('" + "Menu4" + "');", true);
}
示例11: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string retUrl = Request.Params["url"].Trim('#');
string accessToken = string.Empty;
using (Database db = new MySqlDatabase())
{
ClientInfo ci = db.GetClientInfo(Util.UserId);
string[] kvps = retUrl.Split('&');
foreach (string kvp in kvps)
{
string[] parts = kvp.Split('=');
if (parts.Length == 2)
{
string key = parts[0];
string val = parts[1];
if (val.EndsWith(",/social/soundcloud.aspx"))
val = val.Substring(0, val.Length - ",/social/soundcloud.aspx".Length);
if (string.Compare(key, "access_token", true) == 0)
accessToken = val;
db.UpdateSocialCredential(ci.ClientId, SocialConnector.SoundCloud, key, val);
}
}
}
if (!string.IsNullOrEmpty(accessToken))
{
string userName = GetUserData(accessToken);
using (Database db = new MySqlDatabase())
{
UserInfo ui = db.GetUser(Util.UserId);
ClientInfo ci = db.GetClientInfo(ui.UserId);
db.UpdateSoundCloudId(ci.ClientId, userName);
}
}
}
示例12: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string scope = Request.QueryString["scope"];
string access_token = Request.QueryString["access_token"];
if (!string.IsNullOrEmpty(access_token))
{
using (Database db = new MySqlDatabase())
{
UserInfo ui = db.GetUser(Util.UserId);
ClientInfo ci = db.GetClientInfo(ui.UserId);
db.UpdateSocialCredential(ci.ClientId, SocialConnector.SoundCloud, "access_token", access_token);
db.UpdateSocialCredential(ci.ClientId, SocialConnector.SoundCloud, "scope", scope);
db.UpdateSoundCloudId(ci.ClientId, GetUserData(access_token));
}
}
}
示例13: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Session["bodyid"] = "tracks";
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 (!string.IsNullOrEmpty(Request["id"]))
{
long managedUserId = Convert.ToInt64(Request["id"]);
Session["managed.userid"] = managedUserId;
FillRegistrationGrid(Util.UserId, managedUserId);
}
}
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);
}
}
示例14: ModifyClientInfo
private void ModifyClientInfo()
{
try
{
using (Database db = new MySqlDatabase())
{
ClientInfo ci = db.GetClientInfo(Util.UserId);
string lastName = ci.LastName;
string firstName = ci.FirstName;
string addressLine1 = ci.AddressLine1;
string addressLine2 = ci.AddressLine2;
string zipcode = ci.ZipCode;
string city = ci.City;
string state = ci.State;
string country = ci.Country;
string language = ci.Language;
string telephone = ci.Telephone;
string cellular = ci.Cellular; // Cellular.Text;
string accountOwner = ci.AccountOwner;
string bumaCode = BumaNo.Text.Trim();
string senaCode = SenaNo.Text.Trim();
string isrcCode = ISRC.Text.Trim();
string twitterId = ci.TwitterId.Trim();
string facebookId = ci.FacebookId.Trim();
string soundcloudId = ci.SoundCloudId.Trim();
string soniallId = ci.SoniallId.Trim();
string ownerKind = ci.OwnerKind;
string referer = ci.Referer;
char gender = ci.Gender;
string stagename = ci.stagename;
string companyname = ci.CompanyName;
DateTime birthday = Convert.ToDateTime(ci.Birthdate);
if (ci != null)
referer = ci.Referer;
db.RegisterClientInfo(lastName,
firstName,
addressLine1,
addressLine2,
zipcode,
state,
city,
country,
language,
telephone,
cellular,
companyname,
Util.UserId,
accountOwner,
bumaCode,
senaCode,
isrcCode,
twitterId,
facebookId,
soundcloudId,
soniallId,
ownerKind,
string.Empty,
string.Empty,
string.Empty,
referer,
gender,
birthday,
stagename);
// Remove the user's identification certificate so a new one
// can be registered.
UserInfo ui = db.GetUser(Util.UserId);
string userDocPath = db.GetUserDocumentPath(ui.UserId, Session["access"] as string);
string identDocName = string.Format("ID{0:D10}.cer", ui.UserId);
string identDocPath = Path.Combine(userDocPath, identDocName);
if (File.Exists(identDocPath))
{
string filePattern = string.Format("ID{0:D10}.*.cer", ui.UserId);
string[] files = Directory.GetFiles(userDocPath, filePattern);
int highIndex = -1;
foreach (string file in files)
{
string filename = Path.GetFileName(file);
if (filename != null)
{
string[] parts = filename.Split('.');
if (parts.Length == 3)
{
int index;
if (int.TryParse(parts[1], out index))
{
if (index > highIndex)
highIndex = index;
}
}
}
}
if (highIndex > -1)
{
++highIndex;
while (highIndex > 0)
{
//.........这里部分代码省略.........
示例15: UserInformation
private void UserInformation()
{
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 = Convert.ToString(Util.GetUserCredits(Util.UserId));
ProtectedLiteral.Text = Convert.ToString(protectedTracks);
MemberSince.Text = Convert.ToString(ui.MemberSince);
string userDocPath = db.GetUserDocumentPath(ui.UserId, Session["access"] as string);
decimal percentComplete = DetermineCompletion(userDocPath, ui, ci);
Session["percentComplete"] = 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);
}
}