Subversion Repositories SmartDukaan

Rev

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

Rev 4649 Rev 4762
Line 90... Line 90...
90
    private Item item, newItem;
90
    private Item item, newItem;
91
    private CatalogDashboard catalogDashboardPanel;
91
    private CatalogDashboard catalogDashboardPanel;
92
 
92
 
93
    @UiField ItemDetailStyle style;
93
    @UiField ItemDetailStyle style;
94
    @UiField Label itemId;
94
    @UiField Label itemId;
95
    @UiField TextBox productGroup, brand, modelNumber, modelName, color;
95
    @UiField TextBox brand, modelNumber, modelName, color;
96
    @UiField Label contentCategory, catalogItemId;
96
    @UiField Label contentCategory, catalogItemId, productGroup;
97
    @UiField TextBox statusDesc, comments;
97
    @UiField TextBox statusDesc, comments;
98
    @UiField TextBox sellingPrice, mrp, weight;
98
    @UiField TextBox sellingPrice, mrp, weight;
99
    @UiField Label addedOn, retireDate, updatedOn;
99
    @UiField Label addedOn, retireDate, updatedOn;
100
    @UiField Label itemStatus;
100
    @UiField Label itemStatus;
101
    @UiField TextBox bestDealsText, bestDealsValue; 
101
    @UiField TextBox bestDealsText, bestDealsValue; 
Line 843... Line 843...
843
     *     <br>false if some error occurs due to NumberFormatException
843
     *     <br>false if some error occurs due to NumberFormatException
844
     */
844
     */
845
    private boolean createNewItem() {
845
    private boolean createNewItem() {
846
        newItem = new Item();
846
        newItem = new Item();
847
        newItem.setId(item.getId());
847
        newItem.setId(item.getId());
848
        newItem.setVendorCategory(item.getVendorCategory());
-
 
849
        newItem.setProductGroup(productGroup.getText().trim());
848
        newItem.setProductGroup(productGroup.getText().trim());
850
        newItem.setBrand(brand.getText().trim());
849
        newItem.setBrand(brand.getText().trim());
851
        newItem.setModelNumber(modelNumber.getText().trim());
850
        newItem.setModelNumber(modelNumber.getText().trim());
852
        newItem.setModelName(modelName.getText().trim());
851
        newItem.setModelName(modelName.getText().trim());
853
        newItem.setColor(color.getText().trim());
852
        newItem.setColor(color.getText().trim());
Line 939... Line 938...
939
        }
938
        }
940
        
939
        
941
        try {
940
        try {
942
            String preferredWarehouseText = preferredWarehouse.getText().trim();
941
            String preferredWarehouseText = preferredWarehouse.getText().trim();
943
            if(!preferredWarehouseText.equals("")){
942
            if(!preferredWarehouseText.equals("")){
944
                newItem.setPreferredWarehouse(Long.parseLong(preferredWarehouseText) + "");
943
                newItem.setPreferredWarehouse(Long.parseLong(preferredWarehouseText));
945
            }
944
            }
946
        }catch(NumberFormatException nfe){
945
        }catch(NumberFormatException nfe){
947
            Window.alert("Invalid Preferred Warehouse");
946
            Window.alert("Invalid Preferred Warehouse");
948
            return false;
947
            return false;
949
        }
948
        }
950
        
949
        
951
        try {
950
        try {
952
            String defaultWarehouseText = defaultWarehouse.getText().trim();
951
            String defaultWarehouseText = defaultWarehouse.getText().trim();
953
            if(!defaultWarehouseText.equals("")){
952
            if(!defaultWarehouseText.equals("")){
954
                newItem.setDefaultWarehouse(Long.parseLong(defaultWarehouseText) + "");
953
                newItem.setDefaultWarehouse(Long.parseLong(defaultWarehouseText));
955
            }
954
            }
956
        }catch(NumberFormatException nfe){
955
        }catch(NumberFormatException nfe){
957
            Window.alert("Invalid Default Warehouse");
956
            Window.alert("Invalid Default Warehouse");
958
            return false;
957
            return false;
959
        }
958
        }
Line 1106... Line 1105...
1106
     * @return String showing attributes which are changed by the user for confirmation.
1105
     * @return String showing attributes which are changed by the user for confirmation.
1107
     *      <br>Empty string if nothing is changed.
1106
     *      <br>Empty string if nothing is changed.
1108
     */
1107
     */
1109
    private String isItemChanged() {
1108
    private String isItemChanged() {
1110
        StringBuilder sb = new StringBuilder("");
1109
        StringBuilder sb = new StringBuilder("");
1111
        if(!checkParameterIfEqual(productGroup.getText().trim(), item.getProductGroup())) {
-
 
1112
            sb.append("\n-Product Group");
-
 
1113
        }
1110
        
1114
        if(!checkParameterIfEqual(brand.getText().trim(), item.getBrand())) {
1111
        if(!checkParameterIfEqual(brand.getText().trim(), item.getBrand())) {
1115
            sb.append("\n-Brand");
1112
            sb.append("\n-Brand");
1116
        }
1113
        }
1117
        if(!checkParameterIfEqual(modelNumber.getText().trim(), item.getModelNumber())) {
1114
        if(!checkParameterIfEqual(modelNumber.getText().trim(), item.getModelNumber())) {
1118
            sb.append("\n-Model Number");
1115
            sb.append("\n-Model Number");