public List <int> Add_Ship(List <int> ship_ids)
        {
            if (ship_ids == null)
            {
                return(null);
            }
            List <int> ret_rids   = new List <int>();
            int        nextSortNo = this.getNextSortNo <Mem_ship>(this.User_ship.get_Values(), ship_ids.get_Count());

            ship_ids.ForEach(delegate(int x)
            {
                Mem_ship mem_ship = new Mem_ship();
                int newRid        = this.getNewRid(Enumerable.ToList <int>(this.User_ship.get_Keys()));
                if (mem_ship.Set_New_ShipData(newRid, nextSortNo, x))
                {
                    nextSortNo++;
                    this.User_ship.Add(newRid, mem_ship);
                    ret_rids.Add(newRid);
                    this.Add_Book(1, mem_ship.Ship_id);
                }
            });
            return(ret_rids);
        }
Esempio n. 2
0
        public List <int> Add_Ship(List <int> ship_ids)
        {
            if (ship_ids == null)
            {
                return(null);
            }
            List <int> ret_rids   = new List <int>();
            int        nextSortNo = getNextSortNo(User_ship.Values, ship_ids.Count);

            ship_ids.ForEach(delegate(int x)
            {
                Mem_ship mem_ship = new Mem_ship();
                int newRid        = getNewRid(User_ship.Keys.ToList());
                if (mem_ship.Set_New_ShipData(newRid, nextSortNo, x))
                {
                    nextSortNo++;
                    User_ship.Add(newRid, mem_ship);
                    ret_rids.Add(newRid);
                    Add_Book(1, mem_ship.Ship_id);
                }
            });
            return(ret_rids);
        }