Exemple #1
0
        public void Add_Shelf_to_List(Shelf shelf)
        {
            if (root == null)
            {
                root = new shelf_node(shelf);
                return;
            }

            shelf_node iterator = root;

            while (iterator.next != null)
            {
                iterator = iterator.next;
            }

            iterator.next = new shelf_node(shelf);
        }
Exemple #2
0
        public void Fill_Shelf_List(DataTable dt)
        {
            int rows_count = dt.Rows.Count;

            if (rows_count == 0)
            {
                return;
            }
            for (int i = 0; i < rows_count; i++)
            {
                int shelf_id = int.Parse(dt.Rows[i][0].ToString());
                if (shelf_id == 0)
                {
                    continue;
                }
                string shelf_name = dt.Rows[i][1].ToString();

                Shelf shelf = new Shelf(shelf_id, shelf_name);
                shelf.Set_Shelf();
                this.Add_Shelf_to_List(shelf);
            }
        }
Exemple #3
0
 public shelf_node(Shelf s)
 {
     this.shelf = s;
     this.next  = null;
 }