Пример #1
0
        public static new CNoiTiep KhoiTao(XmlElement node)
        {
            CNoiTiep result = new CNoiTiep();

            foreach (XmlElement nodeCon in node.ChildNodes)
            {
                string    name = nodeCon.Name;
                CMachDien temp = null;
                switch (name)
                {
                case "NOI_TIEP":
                    temp = CNoiTiep.KhoiTao(nodeCon);
                    break;

                case "SONG_SONG":
                    temp = CSongSong.KhoiTao(nodeCon);
                    break;

                case "DIEN_TRO":
                    temp = CDienTro.KhoiTao(nodeCon);
                    break;
                }
                result._arrMachDien.Add(temp);
            }

            return(result);
        }
Пример #2
0
        public static CMachDien KhoiTao(XmlElement node)
        {
            CMachDien  result  = null;
            XmlElement nodeCon = (XmlElement)node.FirstChild;
            string     name    = nodeCon.Name;

            switch (name)
            {
            case "NOI_TIEP":
                result = CNoiTiep.KhoiTao(nodeCon);
                break;

            case "SONG_SONG":
                result = CSongSong.KhoiTao(nodeCon);
                break;

            case "DIEN_TRO":
                result = CDienTro.KhoiTao(nodeCon);
                break;
            }
            return(result);
        }