using System;
using System.Collections.Generic;
using System.Text;
using Song.Entities;
using System.Data;
namespace Song.ServiceInterfaces
{
///
/// 院系职位的管理
///
public interface IVote : WeiSha.Common.IBusinessInterface
{
#region 调查主题的操作
///
/// 添加
///
/// 业务实体
int ThemeAdd(Vote entity);
///
/// 修改
///
/// 业务实体
void ThemeSave(Vote entity);
///
/// 删除
///
/// 业务实体
void ThemeDelete(Vote entity);
///
/// 删除,按主键ID;
///
/// 实体的主键
void ThemeDelete(int identify);
///
/// 获取主题,如果当前主题不存在,则返回最新的调查主题
///
///
///
Vote GetTheme(int identify);
///
/// 获取所有简单调查的主题
///
///
///
/// 如果小于等于0,则取所有
///
Vote[] GetSimpleTheme(bool? isShow, bool? isUse,int count);
#endregion
#region 调查项的操作
///
/// 添加
///
/// 业务实体
int ItemAdd(Vote entity);
///
/// 修改
///
/// 业务实体
void ItemSave(Vote entity);
///
/// 删除
///
/// 业务实体
void ItemDelete(Vote entity);
///
/// 删除,按主键ID;
///
/// 实体的主键
void ItemDelete(int identify);
#endregion
///
/// 获取单一实体对象,按主键ID;
///
/// 实体的主键
///
Vote GetSingle(int identify);
///
/// 向某个选项,增加一个投票数
///
///
void AddResult(int identify);
///
/// 向某个选项,增加指定投票数
///
///
/// 指定的票数
void AddResult(int identify,int num);
///
/// 获取某个调查的调查子项
///
///
///
DataTable GetVoteItem(string uniqueid);
///
/// 获取某个调查的子项,并输出该调查总票数
///
///
///
///
Vote[] GetVoteItem(string uniqueid, out int countSum);
///
/// 分页获取
///
///
///
/// 调查类型,1为简单调查,2为复合方多主题调查
///
///
///
///
///
Vote[] GetPager(bool? isShow, bool? isUse,int type, string searTxt, int size, int index, out int countSum);
Vote[] GetPager(bool? isShow, bool? isUse, int type, string searTxt, DateTime start, DateTime end, int size, int index, out int countSum);
}
}