Пример #1
0
 private void GroupVoteHistoryRequest(IClientAPI client, UUID agentID, UUID sessionID, UUID groupID,
                                      UUID transactionID)
 {
     List<GroupProposalInfo> inactiveProposals = m_groupData.GetInactiveProposals(client.AgentId, groupID);
     foreach (GroupProposalInfo proposal in inactiveProposals)
     {
         GroupVoteHistoryItem[] votes = new GroupVoteHistoryItem[1];
         votes[0] = new GroupVoteHistoryItem();
         votes[0].CandidateID = proposal.VoteID;
         votes[0].NumVotes = proposal.NumVotes;
         votes[0].VoteCast = proposal.Result ? "Yes" : "No";
         GroupVoteHistory history = new GroupVoteHistory();
         history.EndDateTime = Util.BuildYMDDateString(proposal.Ending);
         history.Majority = proposal.Majority.ToString();
         history.ProposalText = proposal.Text;
         history.Quorum = proposal.Quorum.ToString();
         history.StartDateTime = Util.BuildYMDDateString(proposal.Created);
         history.VoteID = proposal.VoteID.ToString();
         history.VoteInitiator = proposal.BallotInitiator.ToString();
         history.VoteResult = proposal.Result ? "Success" : "Failure";
         history.VoteType = "Proposal";//Must be set to this, or the viewer won't show it
         client.SendGroupVoteHistory(groupID, transactionID, history, votes);
     }
 }
Пример #2
0
 private void GroupVoteHistoryRequest(IClientAPI client, UUID agentID, UUID groupID, UUID transactionID,
                                      UUID sessionID)
 {
     GroupVoteHistoryItem[] votes = new GroupVoteHistoryItem[0];
     GroupVoteHistory history = new GroupVoteHistory();
     client.SendGroupVoteHistory(groupID, transactionID, history, votes);
 }