예제 #1
0
        public uint SetCityBel(uint city_id, uint country_id)
        {
            int typeint = lc_ObjGather.GetRelNameMap("STU_CITY_COUNTRY");
            int index   = objgather.relship_list[typeint].FindIndex(delegate(STU_RELATION temp) {
                STU_CITY_COUNTRY substu = (STU_CITY_COUNTRY)temp;
                if (substu.city_id == city_id)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            });

            if (index == -1)
            {
                STU_CITY_COUNTRY stu = new STU_CITY_COUNTRY(city_id, country_id);
                objgather.relship_list[typeint].Add(stu);
                return(stu.relship_id);
            }
            else
            {
                STU_CITY_COUNTRY substu = (STU_CITY_COUNTRY)objgather.relship_list[typeint][index];
                substu.country_id = country_id;
                return(substu.relship_id);
            }
        }
예제 #2
0
        }//查询教派总人数

        public List <uint> GetCountryCity(uint country_id)
        {
            List <uint> citys   = new List <uint>();
            int         typeint = lc_ObjGather.GetRelNameMap("STU_CITY_COUNTRY");

            for (int i = 0; i < relship_list[typeint].Count; i++)
            {
                STU_CITY_COUNTRY stu = (STU_CITY_COUNTRY)relship_list[typeint][i];
                if (stu.country_id == country_id)
                {
                    citys.Add(stu.city_id);
                }
            }

            return(citys);
        } //查询所有城市
예제 #3
0
 public STU_CITY_COUNTRY(STU_CITY_COUNTRY temp) : base(temp)
 {
     this.city_id    = temp.city_id;
     this.country_id = temp.country_id;
 }