Subversion Repositories SmartDukaan

Rev

Rev 8901 | Rev 9644 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8901 Rev 9640
Line 70... Line 70...
70
    private final int TABLE_INDEX_WAREHOUSE_ID = 0,
70
    private final int TABLE_INDEX_WAREHOUSE_ID = 0,
71
                      TABLE_INDEX_WAREHOUSE_DESC = 1,
71
                      TABLE_INDEX_WAREHOUSE_DESC = 1,
72
                      TABLE_INDEX_WAREHOUSE_INVA = 2,
72
                      TABLE_INDEX_WAREHOUSE_INVA = 2,
73
                      TABLE_INDEX_WAREHOUSE_INVR = 3,
73
                      TABLE_INDEX_WAREHOUSE_INVR = 3,
74
                      TABLE_INDEX_WAREHOUSE_HELD = 4,
74
                      TABLE_INDEX_WAREHOUSE_HELD = 4,
-
 
75
                      TABLE_INDEX_WAREHOUSE_EBAY_HELD = 5,
-
 
76
                      TABLE_INDEX_WAREHOUSE_SNAPDEAL_HELD = 6,
-
 
77
                      TABLE_INDEX_WAREHOUSE_FLIPKART_HELD = 7,
75
                      TABLE_INDEX_WAREHOUSE_GET_BUTTON = 5,
78
                      TABLE_INDEX_WAREHOUSE_GET_BUTTON = 8,
76
                      TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON = 6;
79
                      TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON = 9;
77
    
80
    
78
    private final int TABLE_INDEX_WAREHOUSE_NAME = 0,
81
    private final int TABLE_INDEX_WAREHOUSE_NAME = 0,
79
    				  TABLE_INDEX_WAREHOUSE_ADD_DEL_BUTTON = 1;    
82
    				  TABLE_INDEX_WAREHOUSE_ADD_DEL_BUTTON = 1;    
80
    
83
    
81
    private final int TABLE_INDEX_SIMILAR_ITEMS_CATALOG_ITEM_ID = 0,
84
    private final int TABLE_INDEX_SIMILAR_ITEMS_CATALOG_ITEM_ID = 0,
Line 300... Line 303...
300
    /**
303
    /**
301
     * initialise item availability table header.
304
     * initialise item availability table header.
302
     */
305
     */
303
    private void initAvailabilityHeader(){
306
    private void initAvailabilityHeader(){
304
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_ID, "100px");
307
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_ID, "100px");
305
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_DESC, "300px");
308
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_DESC, "250px");
306
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVA, "100px");
309
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVA, "100px");
307
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVR, "100px");
310
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVR, "100px");
308
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_HELD, "100px");
311
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_HELD, "100px");
-
 
312
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_EBAY_HELD, "100px");
-
 
313
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_SNAPDEAL_HELD, "100px");
-
 
314
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_FLIPKART_HELD, "100px");
309
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_GET_BUTTON, "100px");
315
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_GET_BUTTON, "100px");
310
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON, "100px");
316
        headerAvailability.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON, "100px");
311
        
317
        
312
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_ID, "Warehouse Id");
318
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_ID, "Warehouse Id");
313
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_DESC, "Warehouse Desc");
319
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_DESC, "Warehouse Desc");
314
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_INVA, "Availability");
320
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_INVA, "Availability");
315
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_INVR, "Reserved");
321
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_INVR, "Reserved");
316
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_HELD, "Held");
322
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_HELD, "Held");
-
 
323
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_EBAY_HELD, "Held");
-
 
324
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_SNAPDEAL_HELD, "Ebay Held");
-
 
325
        headerAvailability.setText(0, TABLE_INDEX_WAREHOUSE_FLIPKART_HELD, "Snapdeal Held");
317
        
326
        
318
        Button getLiveDataButton = new Button("Get Live Data");
327
        Button getLiveDataButton = new Button("Get Live Data");
319
        headerAvailability.setWidget(0, TABLE_INDEX_WAREHOUSE_GET_BUTTON, getLiveDataButton);
328
        headerAvailability.setWidget(0, TABLE_INDEX_WAREHOUSE_GET_BUTTON, getLiveDataButton);
320
        getLiveDataButton.addClickHandler(new ClickHandler() {
329
        getLiveDataButton.addClickHandler(new ClickHandler() {
321
            @Override
330
            @Override
Line 727... Line 736...
727
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_ID, "100px");
736
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_ID, "100px");
728
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_DESC, "300px");
737
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_DESC, "300px");
729
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVA, "100px");
738
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVA, "100px");
730
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVR, "100px");
739
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_INVR, "100px");
731
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_HELD, "100px");
740
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_HELD, "100px");
-
 
741
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_EBAY_HELD, "100px");
-
 
742
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_SNAPDEAL_HELD, "100px");
-
 
743
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_FLIPKART_HELD, "100px");
732
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_GET_BUTTON, "100px");
744
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_GET_BUTTON, "100px");
733
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON, "100px");
745
        availabilityTable.getColumnFormatter().setWidth(TABLE_INDEX_WAREHOUSE_UPDATE_BUTTON, "100px");
734
 
746
 
735
        int i=0;
747
        int i=0;
736
        for(ItemInventory warehousedata : itemInventoryMap.values()){
748
        for(ItemInventory warehousedata : itemInventoryMap.values()){
737
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_ID, warehousedata.getWarehouseId() + "");
749
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_ID, warehousedata.getWarehouseId() + "");
738
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_DESC, Utils.getWarehouseDesc(warehousedata.getWarehouseId()) + "");
750
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_DESC, Utils.getWarehouseDesc(warehousedata.getWarehouseId()) + "");
739
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_INVA, warehousedata.getAvailability() + "");
751
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_INVA, warehousedata.getAvailability() + "");
740
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_INVR, warehousedata.getReserved() + "");
752
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_INVR, warehousedata.getReserved() + "");
741
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_HELD, warehousedata.getHeld() + "");
753
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_HELD, warehousedata.getHeld() + "");
-
 
754
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_EBAY_HELD, warehousedata.getEbayHeld() + "");
-
 
755
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_SNAPDEAL_HELD, warehousedata.getSnapdealHeld() + "");
-
 
756
            availabilityTable.setText(i, TABLE_INDEX_WAREHOUSE_FLIPKART_HELD, warehousedata.getFlipkartHeld() + "");
-
 
757
            
742
            i++;
758
            i++;
743
        }
759
        }
744
    }
760
    }
745
 
761
 
746
    /**
762
    /**