Subversion Repositories SmartDukaan

Rev

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

Rev 3558 Rev 4725
Line 128... Line 128...
128
                return v.getKey();
128
                return v.getKey();
129
            }
129
            }
130
        }
130
        }
131
        return 0;
131
        return 0;
132
    }
132
    }
133
 
133
    
-
 
134
    /**
-
 
135
     * Since in warehouse combo box, warehouse name is populated, this method is used to get Id from name
-
 
136
     * @param warehouse name
-
 
137
     * @return warehouse Id corresponding to the name
-
 
138
     */
-
 
139
    public static long getWarehouseId(String warehouseDesc) {
-
 
140
        if(warehouses == null) {
-
 
141
            return 0;
-
 
142
        }
-
 
143
        for(Entry<Long, String> w : warehouses.entrySet()) {
-
 
144
            if(w.getValue().equals(warehouseDesc)) {
-
 
145
                return w.getKey();
-
 
146
            }
-
 
147
        }
-
 
148
        return 0;
-
 
149
    }
134
    
150
    
135
    /**
151
    /**
136
     * Since in source combo box, source name is populated, this method is used to get Id from name
152
     * Since in source combo box, source name is populated, this method is used to get Id from name
137
     * @param source name
153
     * @param source name
138
     * @return source Id corresponding to the name
154
     * @return source Id corresponding to the name