[OperationContract]
public VoteStatus SetVoteInfo(int? activityObjectID, int? voterMemberID, int? activityID)
{
ActivityEntities ent = new ActivityEntities();
ObjectParameter isVoteOp = new ObjectParameter("isvote", typeof(int));
ObjectParameter billsOp = new ObjectParameter("bills", typeof(int));
ent.VoteUp(activityObjectID, voterMemberID, activityID, isVoteOp, billsOp);
VoteStatus v = new VoteStatus();
v.IsVote = ((int)isVoteOp.Value == 1) ? true : false;
v.ObjectBills = (int)billsOp.Value;
return v;
}
[DataContract]
public class VoteStatus
{
[DataMember]
public Boolean IsVote
{ get; set; }
[DataMember]
public int ObjectBills
{ get; set; }
}
參考資料:
沒有留言:
張貼留言