Subversion Repositories SmartDukaan

Rev

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

Rev 7087 Rev 7096
Line 54... Line 54...
54
        }
54
        }
55
	}
55
	}
56
		
56
		
57
    
57
    
58
	public String index() throws Exception{
58
	public String index() throws Exception{
-
 
59
	    String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
59
        txns = tClient.getRechargeTransactions(1);
60
        if(loginStatus == null || !loginStatus.equals("TRUE")){
-
 
61
            return "authfail";
-
 
62
        }
-
 
63
        txns = tClient.getRechargeTransactions(Long.parseLong((String) request.getSession().getAttribute("STORE_ID")));
60
        return "index";
64
        return "index";
61
        
-
 
62
	}
65
	}
63
	
66
	
64
	    
67
	    
65
    public String getDateTime(long milliseconds) {
68
    public String getDateTime(long milliseconds) {
66
        Calendar cal = Calendar.getInstance();
69
        Calendar cal = Calendar.getInstance();
Line 84... Line 87...
84
    }
87
    }
85
 
88
 
86
    public String getServletContextPath() {
89
    public String getServletContextPath() {
87
        return context.getContextPath();
90
        return context.getContextPath();
88
    }
91
    }
-
 
92
    
-
 
93
    public String getOperatorName(long operatorId) {
-
 
94
        String operatorName = "";
-
 
95
        if (HomeController.getMobileProvidersMap().containsKey(operatorId)) {
-
 
96
            operatorName = HomeController.getMobileProvidersMap().get(operatorId);
-
 
97
        } else if(HomeController.getDthProvidersMap().containsKey(operatorId)) {
-
 
98
            operatorName = HomeController.getDthProvidersMap().get(operatorId);
-
 
99
        } else {
-
 
100
            operatorName = "N/A";
-
 
101
        }
-
 
102
        return operatorName;
-
 
103
    }
89
}
104
}
90
 
105