Subversion Repositories SmartDukaan

Rev

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

Rev 23526 Rev 23539
Line 368... Line 368...
368
	
368
	
369
	public static String getStateCode(String stateName) throws Exception{
369
	public static String getStateCode(String stateName) throws Exception{
370
		return getStateInfo(stateName).getStateCode();
370
		return getStateInfo(stateName).getStateCode();
371
	}
371
	}
372
	
372
	
373
	public static long getStateId(String stateName) throws Exception{
373
	public static long getStateId(String stateName) throws ProfitMandiBusinessException {
-
 
374
		try {
374
		return getStateInfo(stateName).getId();
375
			return getStateInfo(stateName).getId();
-
 
376
		} catch(Exception e) {
-
 
377
			e.printStackTrace();
-
 
378
			throw new ProfitMandiBusinessException("State Name", stateName, "Could not fetch state");
-
 
379
		}
375
	}
380
	}
376
	
381
	
377
	public static StateInfo getStateByStateId(long stateId) throws Exception{
382
	public static StateInfo getStateByStateId(long stateId) throws Exception{
378
		InventoryClient client = new InventoryClient();
383
		InventoryClient client = new InventoryClient();
379
		InventoryService.Client inventoryClient = client.getClient();
384
		InventoryService.Client inventoryClient = client.getClient();