using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Service
{
	public interface IGroupManager : IGenericManager<Group>
	{
		/// <summary>
		/// 获取指定分组及其所属的子组列表
		/// </summary>
		/// <param name="group"></param>
		/// <returns></returns>
        IList<Group> GetGroupList(Group group);

        /// <summary>
        /// 获取指定分组及其所属的子组列表
        /// </summary>
        /// <param name="hotelID"></param>
        /// <returns></returns>
        IList<Group> GetGroupList(int hotelID);

		/// <summary>
		/// 构造楼层树，用于 easyui-tree, easyui-combotree
		/// </summary>
		/// <param name="group"></param>
		/// <returns></returns>
        IList<object> CreateGroupTree(Group group, int hotelID);

		/// <summary>
		/// 构造楼层树，用于 easyui-tree, easyui-combotree
		/// </summary>
		/// <param name="group"></param>
		/// <returns></returns>
        object CreateGroupTree2(Group group, int hotelID);

		/// <summary>
		/// 构造带房号的 easyui-tree 数据格式的分组树，房号附在其所属的结点之下
		/// 如果分支上的房号包含在 checkedHosts 则将其选中
		/// BLW
		/// ├1栋
		/// │ └1层
		/// │　  ├101
		/// │	  └102
		/// └2栋
		///	   └2层
		/// </summary>
		/// <param name="group"></param>
		/// <param name="checkedHosts"></param>
		/// <returns></returns>
        IList<object> CreateGroupTreeWithRoom(Group group, IList<Host> checkedHosts, int hotelID);

		/// <summary>
		/// 按层级构造分组名称
		/// 例如:
		///		BLW-1栋-1层
		/// </summary>
		/// <param name="group"></param>
		/// <returns></returns>
		string BuildGroupName(Group group);
	}
}
