| Line 303... |
Line 303... |
| 303 |
Button addButton = new Button("Add");
|
303 |
Button addButton = new Button("Add");
|
| 304 |
headerSourcePrices.setWidget(0, TABLE_INDEX_SOURCE_PRICING_BUTTON, addButton);
|
304 |
headerSourcePrices.setWidget(0, TABLE_INDEX_SOURCE_PRICING_BUTTON, addButton);
|
| 305 |
addButton.addClickHandler(new ClickHandler() {
|
305 |
addButton.addClickHandler(new ClickHandler() {
|
| 306 |
@Override
|
306 |
@Override
|
| 307 |
public void onClick(ClickEvent event) {
|
307 |
public void onClick(ClickEvent event) {
|
| - |
|
308 |
SourcePricesDialog sourcePricesDialog = new SourcePricesDialog(mrp.getText().trim(), sellingPrice.getText().trim());
|
| 308 |
SourcePricesDialog sourcePricesDialog = new SourcePricesDialog();
|
309 |
//SourcePricesDialog sourcePricesDialog = new SourcePricesDialog();
|
| 309 |
sourcePricesDialog.updateButton.setText("Add");
|
310 |
sourcePricesDialog.updateButton.setText("Add");
|
| 310 |
sourcePricesDialog.setSourcePriceUpdateListener(new SourcePricesDialog.SourcePriceUpdateListener() {
|
311 |
sourcePricesDialog.setSourcePriceUpdateListener(new SourcePricesDialog.SourcePriceUpdateListener() {
|
| 311 |
@Override
|
312 |
@Override
|
| 312 |
public boolean onUpdate(double mrp, double sellingPrice, long sourceId) {
|
313 |
public boolean onUpdate(double mrp, double sellingPrice, long sourceId) {
|
| 313 |
if(!sourceExists(sourceId)) {
|
314 |
if(!sourceExists(sourceId)) {
|