public abstract int InsertPoll(PollDetails poll);
 public abstract bool UpdatePoll(PollDetails poll);
예제 #3
0
 /// <summary>
 /// Returns a Poll object filled with the data taken from the input PollDetails
 /// </summary>
 private static Poll GetPollFromPollDetails(PollDetails record)
 {
     if (record == null)
     return null;
      else
      {
     return new Poll(record.ID, record.AddedDate, record.AddedBy,
        record.QuestionText, record.IsCurrent,
        record.IsArchived, record.ArchivedDate, record.Votes);
      }
 }
예제 #4
0
 /// <summary>
 /// Updates an existing poll
 /// </summary>
 public static bool UpdatePoll(int id, string questionText, bool isCurrent)
 {
     PollDetails record = new PollDetails(id, DateTime.Now, "",
     questionText, isCurrent, false, DateTime.Now, 0);
      bool ret = SiteProvider.Polls.UpdatePoll(record);
      BizObject.PurgeCacheItems("polls_polls_true");
      BizObject.PurgeCacheItems("polls_poll_" + id.ToString());
      if (isCurrent)
     BizObject.PurgeCacheItems("polls_poll_current");
      return ret;
 }
예제 #5
0
 /// <summary>
 /// Creates a new poll
 /// </summary>
 public static int InsertPoll(string questionText, bool isCurrent)
 {
     PollDetails record = new PollDetails(0, DateTime.Now, BizObject.CurrentUserName,
     questionText, isCurrent, false, DateTime.Now, 0);
      int ret = SiteProvider.Polls.InsertPoll(record);
      BizObject.PurgeCacheItems("polls_polls_true");
      if (isCurrent)
     BizObject.PurgeCacheItems("polls_poll_current");
      return ret;
 }
 public abstract int InsertPoll(PollDetails poll);
 public abstract bool UpdatePoll(PollDetails poll);