/*设置对象关系*/ public uint SetPeoCity(uint peo_id, uint city_id) { int typeint = lc_ObjGather.GetRelNameMap("STU_PEO_CITY"); int index = objgather.relship_list[typeint].FindIndex(delegate(STU_RELATION temp) { STU_PEO_CITY substu = (STU_PEO_CITY)temp; if (substu.peo_id == peo_id) { return(true); } else { return(false); } }); if (index == -1) { STU_PEO_CITY stu = new STU_PEO_CITY(peo_id, city_id); objgather.relship_list[typeint].Add(stu); return(stu.relship_id); } else { STU_PEO_CITY substu = (STU_PEO_CITY)objgather.relship_list[typeint][index]; substu.city_id = city_id; return(substu.relship_id); } }
public STU_PEO_CITY(STU_PEO_CITY temp) : base(temp) { this.peo_id = temp.peo_id; this.city_id = temp.city_id; }