Ejemplo n.º 1
0
        /// <summary>
        /// tao model gom danh sach group va cac resources cua no
        /// </summary>
        /// <returns></returns>
        List <GroupManagement> InitModel()
        {
            List <GroupManagement> result = new List <GroupManagement>();
            //load toan bo group tu database
            List <PerGroup> groups = PerGroupDAO.getAll();

            foreach (PerGroup group in groups)
            {
                //gan tung group cho thuoc tinh group cua model
                GroupManagement groupManagement = new GroupManagement();
                groupManagement.PerGroup = group;
                groupManagement.GetListResourcesByGroupID(group.GroupID);
                result.Add(groupManagement);
            }
            return(result);
        }