コード例 #1
0
        /*第二版*/
        public void deleteMember(string name)
        {
            IDBUtil        dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl");
            List <Partner> list1  = dBUtil.getPartnerList(name);

            for (int i = 0; i < list1.Count; i++)
            {
                dBUtil.deletePartner(list1[i].Name);
            }
            dBUtil.deleteMember(name);
        }
コード例 #2
0
        /*第二版*/
        public void deleteMap(int mapid)
        {
            IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl");

            dBUtil.deleteMap(mapid);
            List <Member> list1 = dBUtil.getMemberList(mapid);

            for (int i = 0; i < list1.Count; i++)
            {
                List <Partner> list2 = dBUtil.getPartnerList(list1[i].Name);
                for (int j = 0; j < list2.Count; j++)
                {
                    dBUtil.deletePartner(list2[j].Name);
                }
                dBUtil.deleteMember(list1[i].Name);
            }
        }