public RatingVotingWrapper(BXRatingVoting charge, BXAdminPage parentPage)
    {
        if (charge == null)
            throw new ArgumentNullException("charge");
        this.charge = charge;

        if (parentPage == null)
            throw new ArgumentNullException("parentPage");
        this.parentPage = parentPage;
    }
    private void TryLoadVoting()
    {
        int id = Id;
        if (id <= 0)
        {
            errorMessage.AddErrorMessage(GetMessage("Error.UnableToFindVoting"));
            errorOnPage = true;
            return;
        }
        if ((_voting = BXRatingVoting.GetById(id, BXTextEncoder.EmptyTextEncoder)) == null)
        {
            errorMessage.AddErrorMessage(GetMessage("Error.UnableToFindVoting"));
            errorOnPage = true;
            return;
        }

        VotingTypeName.Text = _voting.RatedItem.TypeName;
        VotingTypeName.Enabled = false;
        //VotingSubject.Text = votingSubject;

        VotingTypeName.Text = this.GetMessage("VotingEntityType." + _voting.RatedItem.TypeName);
        VotingSubject.TypeName = _voting.RatedItem.TypeName;
        VotingSubject.ItemId = _voting.RatedItem.Identity;
        VotingSubject.DataBind();

        VotingCreatedUtc.Text = _voting.CreatedUtc.ToLocalTime().ToString();
        VotingCreatedUtc.Enabled = false;

        VotingLastCalculatedUtc.Text = _voting.LastCalculatedUtc.ToLocalTime().ToString();
        VotingLastCalculatedUtc.Enabled = false;

        VotingTotalNegativeVotes.Text = _voting.TotalNegativeVotes.ToString();
        VotingTotalNegativeVotes.Enabled = false;

        VotingTotalPositiveVotes.Text = _voting.TotalPositiveVotes.ToString();
        VotingTotalPositiveVotes.Enabled = false;

        VotingTotalVotes.Text = _voting.TotalVotes.ToString();
        VotingTotalVotes.Enabled = false;

        VotingTotalValue.Text = _voting.TotalValue.ToString();
        VotingTotalValue.Enabled = false;
    }