Subversion Repositories SmartDukaan

Rev

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

Rev 5516 Rev 5586
Line 30... Line 30...
30
    
30
    
31
    // role column in helper.catalogdashboarduser table. role specifies 
31
    // role column in helper.catalogdashboarduser table. role specifies 
32
    // the username-pwd pair for staging or for production.
32
    // the username-pwd pair for staging or for production.
33
    // production password is needed while updating item on production server.
33
    // production password is needed while updating item on production server.
34
    public static final int ROLE_STAGING = 0, ROLE_PRODUCTION = 1;
34
    public static final int ROLE_STAGING = 0, ROLE_PRODUCTION = 1;
-
 
35
    private static boolean entityIdMandatory = false;
35
    
36
    
36
    private static Map<Long, String> vendors, warehouses, sources, voucherType;
37
    private static Map<Long, String> vendors, warehouses, sources, voucherType;
37
    private static List<String> categories, brands;
38
    private static List<String> categories, brands;
38
    
39
    
39
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
40
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
40
    
41
    
41
    static {
42
    static {
-
 
43
    	catalogService.getConfigforentityIdMandatory(new AsyncCallback<Boolean>() {
-
 
44
	        @Override
-
 
45
	        public void onSuccess(Boolean result) {
-
 
46
	        	setEntityIdMandatory(result);
-
 
47
	        }
-
 
48
	        @Override
-
 
49
	        public void onFailure(Throwable caught) {
-
 
50
	            caught.printStackTrace();
-
 
51
	        }
-
 
52
	    });
-
 
53
    	
42
        catalogService.getAllVendors(new AsyncCallback<Map<Long,String>>() {
54
        catalogService.getAllVendors(new AsyncCallback<Map<Long,String>>() {
43
            @Override
55
            @Override
44
            public void onSuccess(Map<Long, String> result) {
56
            public void onSuccess(Map<Long, String> result) {
45
                vendors = result;
57
                vendors = result;
46
            }
58
            }
Line 105... Line 117...
105
            }
117
            }
106
        });
118
        });
107
 
119
 
108
    }
120
    }
109
    
121
    
-
 
122
    public static void setEntityIdMandatory(boolean entityIdMandatory) {
-
 
123
		Utils.entityIdMandatory = entityIdMandatory;
-
 
124
	}
-
 
125
 
-
 
126
	public static boolean isEntityIdMandatory() {
-
 
127
		return entityIdMandatory;
-
 
128
	}
-
 
129
 
110
    public static Map<Long, String> getAllVendors() {
130
	public static Map<Long, String> getAllVendors() {
111
        return vendors;
131
        return vendors;
112
    }
132
    }
113
 
133
 
114
    public static Map<Long, String> getAllSources() {
134
    public static Map<Long, String> getAllSources() {
115
        return sources;
135
        return sources;