コード例 #1
0
 /// <summary>
 /// 删除多条投票记录数据
 /// </summary>
 /// <param name="strID">投票记录的主键值,以,号分隔</param>
 public static void DeleteVoteRecord(string strID)
 {
     VoteItemBLL.ChangeVoteItemCountByGeneral(strID, ChangeAction.Minus);
     int[] ids = Array.ConvertAll <string, int>((strID + ",").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), k => Convert.ToInt32(k));
     dal.DeleteVoteRecord(ids);
 }
コード例 #2
0
 /// <summary>
 /// 增加一条投票记录数据
 /// </summary>
 /// <param name="voteRecord">投票记录模型变量</param>
 public static int AddVoteRecord(VoteRecordInfo voteRecord)
 {
     voteRecord.ID = dal.AddVoteRecord(voteRecord);
     VoteItemBLL.ChangeVoteItemCount(voteRecord.ItemID, ChangeAction.Plus);
     return(voteRecord.ID);
 }