示例#1
0
        public static List <SponsorType> getLocalSponsorList()
        {
            List <SponsorType> dataList = new List <SponsorType>();
            List <string>      strList  = LocalLists.getSponsorList();

            foreach (string s in strList)
            {
                string[]    items = s.Split(';');
                SponsorType st    = new SponsorType();
                st.Title         = items[0].Trim();
                st.Color         = items[1].Trim();
                st.Type          = Int32.Parse(items[2].Trim());
                st.Id            = st.Title.GetHashCode().ToString() + st.Type.GetHashCode().ToString();
                st.CreatedAtTime = DateTime.Now;
                st.UpdatedAtTime = DateTime.Now;
                dataList.Add(st);
            }

            return(dataList);
        }
示例#2
0
        public static List <Exhibitor> getLocalExhibitorList()
        {
            List <Exhibitor> exhList = new List <Exhibitor>();
            List <string>    strList = LocalLists.getExhibitorList();
            Dictionary <string, SponsorType> dict = getLocalSponsorDictionary();

            foreach (string s in strList)
            {
                string[]  items = s.Split(';');
                Exhibitor exh   = new Exhibitor();
                exh.Title         = items[0].Trim();
                exh.SponsorTypeId = items[1].Trim();
                exh.Icon          = items[2].Trim();
                exh.Id            = Guid.NewGuid().ToString();
                exh.CreatedAtTime = DateTime.Now;
                exh.UpdatedAtTime = DateTime.Now;
                exh.SponsorType   = dict[exh.SponsorTypeId];
                exhList.Add(exh);
            }
            return(exhList);
        }