Beispiel #1
0
        /// <summary>
        /// 根據TB_SchoolOrClassOrTempGroup組成節點資料串列
        /// </summary>
        /// <returns></returns>
        public static List <clsGroupNode> GetNodeDatasBy_TB_SchoolOrClassOrTempGroup(DataTable dtNodeDatas, string GroupClassifacationName)
        {
            List <clsGroupNode> NodeDatas = new List <clsGroupNode>();

            switch (GroupClassifacationName)
            {
            case clsGroupNode.GroupClassification_SchoolGroup:
                foreach (DataRow dtNodeData in dtNodeDatas.Rows)
                {
                    clsGroupNode nodeData = new clsGroupNode(
                        dtNodeData[TF_ORCS_SchoolGroup_SchoolGroupID].ToString(),
                        dtNodeData[TF_ORCS_SchoolGroup_SchoolGroupName].ToString(),
                        dtNodeData[TF_ORCS_SchoolGroup_ParentNodeID].ToString(),
                        "0",
                        clsGroupNode.GroupClassification_SchoolGroup
                        );
                    NodeDatas.Add(nodeData);
                }
                break;

            case clsGroupNode.GroupClassification_ClassGroup:
                foreach (DataRow dtNodeData in dtNodeDatas.Rows)
                {
                    clsGroupNode nodeData = new clsGroupNode(
                        dtNodeData[TF_ORCS_ClassGroup_ClassGroupID].ToString(),
                        dtNodeData[TF_ORCS_ClassGroup_ClassGroupName].ToString(),
                        dtNodeData[TF_ORCS_ClassGroup_SchoolGroupID].ToString(),
                        "0",
                        clsGroupNode.GroupClassification_ClassGroup
                        );
                    NodeDatas.Add(nodeData);
                }
                break;

            case clsGroupNode.GroupClassification_TempGroup:
                foreach (DataRow dtNodeData in dtNodeDatas.Rows)
                {
                    clsGroupNode nodeData = new clsGroupNode(
                        dtNodeData[TF_ORCS_TempGroup_TempGroupID].ToString(),
                        dtNodeData[TF_ORCS_TempGroup_TempGroupName].ToString(),
                        dtNodeData[TF_ORCS_TempGroup_ClassGroupID].ToString(),
                        "0",
                        clsGroupNode.GroupClassification_TempGroup
                        );
                    NodeDatas.Add(nodeData);
                }
                break;

            default:
                break;
            }
            return(NodeDatas);
        }
Beispiel #2
0
        /// <summary>
        /// 設定小組資訊
        /// </summary>
        public static void SetGroupTeams()
        {
            GroupTeams = new List <clsGroupNode>();
            DataTable TeamDatas = ORCS_TempGroup_SELECT_All();

            foreach (DataRow TeamData in TeamDatas.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(TeamData[TF_ORCS_TempGroup_TempGroupID].ToString(),
                                                          TeamData[TF_ORCS_TempGroup_TempGroupName].ToString(),
                                                          TeamData[TF_ORCS_TempGroup_ClassGroupID].ToString(),
                                                          "false",
                                                          clsGroupNode.GroupClassification_TempGroup);
                GroupDepartments.Add(groupNode);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 設定課程資訊
        /// </summary>
        public static void SetGroupCourses()
        {
            GroupCourses = new List <clsGroupNode>();
            DataTable CourseDatas = ORCS_classGroup_SELECT_All();

            foreach (DataRow CourseData in CourseDatas.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(CourseData[TF_ORCS_ClassGroup_ClassGroupID].ToString(),
                                                          CourseData[TF_ORCS_ClassGroup_ClassGroupName].ToString(),
                                                          CourseData[TF_ORCS_ClassGroup_SchoolGroupID].ToString(),
                                                          "false",
                                                          clsGroupNode.GroupClassification_ClassGroup);
                GroupCourses.Add(groupNode);
            }
        }
Beispiel #4
0
        /// <summary>
        /// 設定部門資訊
        /// </summary>
        public static void SetGroupDepartments()
        {
            GroupDepartments = new List <clsGroupNode>();
            DataTable DepartmentDatas = ORCS_SchoolGroup_SELECT_All();

            foreach (DataRow DepartmentData in DepartmentDatas.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(DepartmentData[TF_ORCS_SchoolGroup_SchoolGroupID].ToString(),
                                                          DepartmentData[TF_ORCS_SchoolGroup_SchoolGroupName].ToString(),
                                                          DepartmentData[TF_ORCS_SchoolGroup_ParentNodeID].ToString(),
                                                          "false",
                                                          clsGroupNode.GroupClassification_SchoolGroup);
                GroupDepartments.Add(groupNode);
            }
        }
Beispiel #5
0
        /// <summary>
        /// 設定群組資訊
        /// </summary>
        public static void SetGroups()
        {
            Groups = new List <clsGroupNode>();
            DataTable GroupDatas = ORCS_Group_SELECT_All();

            foreach (DataRow GroupData in GroupDatas.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(GroupData[TF_Group_NodeID].ToString(),
                                                          GroupData[TF_Group_NodeName].ToString(),
                                                          GroupData[TF_Group_ParentNodeID].ToString(),
                                                          GroupData[TF_Group_IsNextNodeDepartment].ToString(),
                                                          GroupData[TF_Group_NodeClassificationID].ToString());
                Groups.Add(groupNode);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 根據部門ID取得所有課程
        /// </summary>
        /// <returns></returns>
        public static List <clsGroupNode> GetAllCourseByDepartment(string strDepartmentID)
        {
            DataTable           dtCourseGroups = ORCS_ClassGroup_SELECT_By_cSchoolGroupID(strDepartmentID);
            List <clsGroupNode> groupNodes     = new List <clsGroupNode>();

            foreach (DataRow drCourseGroup in dtCourseGroups.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(drCourseGroup[TF_ORCS_ClassGroup_ClassGroupID].ToString(),
                                                          drCourseGroup[TF_ORCS_ClassGroup_ClassGroupName].ToString(),
                                                          drCourseGroup[TF_ORCS_ClassGroup_SchoolGroupID].ToString(),
                                                          "false", clsGroupNode.GroupClassification_ClassGroup);
                groupNodes.Add(groupNode);
            }
            return(groupNodes);
        }
Beispiel #7
0
        /// <summary>
        /// 取得所有部門
        /// </summary>
        /// <returns></returns>
        public static List <clsGroupNode> GetAllDepartment()
        {
            DataTable           dtSchoolGroups = ORCS_SchoolGroup_SELECT_All();
            List <clsGroupNode> groupNodes     = new List <clsGroupNode>();

            foreach (DataRow drSchoolGroup in dtSchoolGroups.Rows)
            {
                clsGroupNode groupNode = new clsGroupNode(drSchoolGroup[TF_ORCS_SchoolGroup_SchoolGroupID].ToString(),
                                                          drSchoolGroup[TF_ORCS_SchoolGroup_SchoolGroupName].ToString(),
                                                          drSchoolGroup[TF_ORCS_SchoolGroup_ParentNodeID].ToString(),
                                                          "false", clsGroupNode.GroupClassification_SchoolGroup);
                groupNodes.Add(groupNode);
            }
            return(groupNodes);
        }
Beispiel #8
0
        /// <summary>
        /// 根據TB_Group組成節點資料串列
        /// </summary>
        /// <returns></returns>
        public static List <clsGroupNode> GetNodeDatasBy_TB_Group(DataTable dtNodeDatas)
        {
            //Get LevelGroup node data list
            List <clsGroupNode> NodeDatas = new List <clsGroupNode>();

            foreach (DataRow dtNodeData in dtNodeDatas.Rows)
            {
                clsGroupNode nodeData = new clsGroupNode(
                    dtNodeData[clsGroup.TF_Group_NodeID].ToString(),
                    dtNodeData[clsGroup.TF_Group_NodeName].ToString(),
                    dtNodeData[clsGroup.TF_Group_ParentNodeID].ToString(),
                    dtNodeData[clsGroup.TF_Group_IsNextNodeDepartment].ToString(),
                    dtNodeData[clsGroup.TF_Group_NodeClassificationID].ToString()
                    );
                NodeDatas.Add(nodeData);
            }
            return(NodeDatas);
        }