using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Song.Entities;
namespace Song.ServiceInterfaces
{
///
/// 章节管理
///
public interface IOutline : WeiSha.Common.IBusinessInterface
{
#region 章节管理
///
/// 添加章节
///
/// 业务实体
void OutlineAdd(Outline entity);
///
/// 批量添加章节,可用于导入时
///
/// 机构id
/// 专业id
/// 课程(或课程)id
/// 名称,可以是用逗号分隔的多个名称
///
Outline OutlineBatchAdd(int orgid, int sbjid, int couid, string names);
///
/// 是否已经存在章节
///
/// 机构id
/// 专业id
/// 课程(或课程)id
/// 上级id
///
///
Outline OutlineIsExist(int orgid, int sbjid, int couid, int pid, string name);
///
/// 修改章节
///
/// 业务实体
void OutlineSave(Outline entity);
///
/// 更新章节的试题数
///
/// 章节Id
/// 试题数
///
int UpdateQuesCount(int olid, int count);
///
/// 导入章节,导入时不立即生成缓存
///
///
void OutlineInput(Outline entity);
///
/// 导出课程章节到Excel
///
///
/// 课程ID
///
string OutlineExport4Excel(string path, int couid);
///
/// 删除章节
///
/// 业务实体
void OutlineDelete(Outline entity);
///
/// 删除,按主键ID;
///
/// 实体的主键
void OutlineDelete(int identify);
///
/// 获取单一实体对象,按主键ID;
///
/// 实体的主键
///
Outline OutlineSingle(int identify);
///
/// 获取单一实体对象,按唯一值,即UID;
///
/// 全局唯一值
///
Outline OutlineSingle(string uid);
///
/// 获取某个课程内的章节,按级别取
///
/// 课程ID
/// 多级名称
///
Outline OutlineSingle(int couid, List names);
///
/// 当前章节下的所有子章节id
///
///
///
List TreeID(int id);
///
/// 获取某个课程下第一个章节
///
/// 课程Id
/// 是否包括只是允许的章节,null取所有范围,true只是允许采用的章节,false反之
///
Outline OutlineFirst(int couid, bool? isUse);
///
/// 获取章节名称,如果为多级,则带上父级名称
///
///
///
string OutlineName(int identify);
///
/// 获取所有课程章节
///
/// 所属课程id
///
///
Outline[] OutlineAll(int couid, bool? isUse);
///
/// 生成树形结构的章节列表
///
///
///
DataTable OutlineTree(Song.Entities.Outline[] outlines);
///
/// 清空章节下试题和附件
///
///
void OutlineClear(int identify);
///
/// 清理无效章节
///
/// 课程ID
///
int OutlineCleanup(int couid);
/////
///// 构建缓存
/////
/////
//List OutlineBuildCache();
///
/// 获取指定个数的章节列表
///
/// 所属课程id
///
/// 取多少条记录,如果小于等于0,则取所有
///
Outline[] OutlineCount(int couid, string search, bool? isUse, int count);
///
/// 获取指定个数的章节列表
///
///
/// 是否是直播章节
///
///
///
///
Outline[] OutlineCount(int couid, bool? islive, string search, bool? isUse, int count);
///
/// 直播中的章节
///
///
///
///
List OutlineLiving(int orgid, int count);
///
/// 取指定数量的章节
///
///
/// 父id
///
///
///
Outline[] OutlineCount(int couid, int pid, bool? isUse, int count);
///
/// 取指定数量的章节
///
/// 机构Id
/// 专业id
/// 课程id
/// 章节上级Id
///
///
///
Outline[] OutlineCount(int orgid, int sbjid, int couid, int pid, bool? isUse, int count);
///
/// 当前课程下的章节数
///
/// 课程id
///
///
///
int OutlineOfCount(int couid, int pid, bool? isUse);
int OutlineOfCount(int orgid, int sbjid, int couid, int pid, bool? isUse);
///
/// 当前课程下的章节数
///
/// 课程id
/// 父id
/// 是否启用
/// 是否有视频
/// 章节是否完节
///
int OutlineOfCount(int couid, int pid, bool? isUse, bool? isVideo, bool? isFinish);
///
/// 是否有子级章节
///
/// 课程id
/// 父id
///
///
bool OutlineIsChildren(int couid, int pid, bool? isUse);
///
/// 当前章节是否有试题
///
///
///
///
bool OutlineIsQues(int olid, bool? isUse);
///
/// 当前章节的子级章节
///
///
///
///
///
Outline[] OutlineChildren(int couid, int pid, bool? isUse, int count);
///
/// 分页取课程章节的信息
///
/// 所属课程id
///
///
///
///
///
///
Outline[] OutlinePager(int couid, bool? isUse, string searTxt, int size, int index, out int countSum);
///
/// 当前章节的试题
///
///
///
///
///
///
Questions[] QuesCount(int olid, int type, bool? isUse, int count);
///
/// 当前章节有多少道试题
///
///
///
///
/// 是否取所有(当前章节下所有子章节的试题一块算)
///
int QuesOfCount(int olid, int type, bool? isUse, bool isAll);
///
/// 将当前项目向上移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动;
///
///
/// 如果已经处于顶端,则返回false;移动成功,返回true
bool OutlineUp(int couid, int id);
///
/// 将当前项目向下移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动;
///
///
/// 如果已经处于顶端,则返回false;移动成功,返回true
bool OutlineDown(int couid, int id);
///
/// 将当前章节升级
///
///
///
bool OutlineToLeft(int couid, int id);
///
/// 将当前章节退级
///
///
///
bool OutlineToRight(int couid, int id);
#endregion
#region 章节事件
///
/// 添加章节中视频播放事件
///
///
void EventAdd(OutlineEvent entity);
///
/// 修改播放事件
///
///
void EventSave(OutlineEvent entity);
///
/// 删除事件
///
///
void EventDelete(OutlineEvent entity);
///
/// 删除事件
///
///
void EventDelete(int identify);
///
/// 获取单一实体对象,按主键ID;
///
/// 实体的主键
///
OutlineEvent EventSingle(int identify);
///
/// 返回章节下所有事件
///
/// 课程ID
/// 章节ID,不可以为零,否则会取所有
/// 事件类型,1为提醒,2为知识展示,3课堂提问,4实时反馈(例如,选择某项后跳转到某秒)
///
///
OutlineEvent[] EventAll(int couid, int olid, int type, bool? isUse);
///
/// 返回章节下所有事件
///
/// 课程ID
/// 章节的全局唯一值
///
///
///
OutlineEvent[] EventAll(int couid, string uid, int type, bool? isUse);
///
/// 获取试题类型的信息
///
///
///
DataTable EventQues(int oeid);
///
/// 获取时间反馈的信息
///
///
///
DataTable EventFeedback(int oeid);
#endregion
#region 事件
///
/// 当章节更改时
///
event EventHandler Save;
event EventHandler Add;
event EventHandler Delete;
void OnSave(object sender, EventArgs e);
void OnAdd(object sender, EventArgs e);
void OnDelete(object sender, EventArgs e);
#endregion
}
}