Пример #1
0
    protected void TransferViaRepresentativeView_Activate(object sender, EventArgs e)
    {
        var representativesList = Representative.GetAllActiveFromCountry(user.Country);

        if (representativesList.Count > 0)
        {
            NoRepresentativeInfoPlaceHolder.Visible      = false;
            RepresentativeInfoContentPlaceHolder.Visible = true;
            AvaibleRepresentativeList.Items.Clear();

            String RadioButtonStyles = "style=\"float: left; padding-left: 5px; padding-right: 5px; \"";
            foreach (var representative in representativesList)
            {
                var item = new ListItem(String.Format("<p {0}>{1}</p> {2}", RadioButtonStyles, representative.Name, HtmlRatingGenerator.GenerateHtmlRating(RatingType.Representative, representative.UserId)), representative.Id.ToString());
                AvaibleRepresentativeList.Items.Add(item);
            }

            flagImage.ImageUrl = string.Format("~/Images/Flags/{0}.png", CountryManager.GetCountryCode(user.Country).ToLower());

            AvaibleRepresentativeList.SelectedIndex = 0;
            AvaibleRepresentativeList_SelectedIndexChanged(null, null);
        }
    }
Пример #2
0
 public static String GetHtmlRatingStringForUser(int userId)
 {
     return(HtmlRatingGenerator.GenerateHtmlRating(RatingType.CryptocurrencyTrading, userId));
 }