From 074584f043a05ea6dbc7d4b09f3d70263a7733b9 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 23 Jun 2007 01:20:20 +0000 Subject: [PATCH] Revert revisions 2734 to 2738. Comments on tracker http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335 --- base/src/org/adempiere/model/Postcode.java | 177 --------------- .../src/org/compiere/grid/ed/VLocation.java | 22 +- .../org/compiere/grid/ed/VLocationDialog.java | 202 +----------------- migration/320-trunk/014_postcode_lookup.sql | 62 ------ .../postgresql/014_postcode_lookup.sql | 62 ------ 5 files changed, 7 insertions(+), 518 deletions(-) delete mode 100644 base/src/org/adempiere/model/Postcode.java delete mode 100644 migration/320-trunk/014_postcode_lookup.sql delete mode 100644 migration/320-trunk/postgresql/014_postcode_lookup.sql diff --git a/base/src/org/adempiere/model/Postcode.java b/base/src/org/adempiere/model/Postcode.java deleted file mode 100644 index ead4544030..0000000000 --- a/base/src/org/adempiere/model/Postcode.java +++ /dev/null @@ -1,177 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Akuna Group Ltd. * - * Copyright (C) Contributors * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Michael Judd (mjudd@users.sf.net) * - **********************************************************************/ - -package org.adempiere.model; - -import org.adempiere.interfaces.*; - -public class Postcode implements PostcodeInterface -{ - - // required implementation by interface - private String Street1; - private String Street2; - private String Street3; - private String Street4; - private String City; - private String Region; - private String Postcode; - private String Country; - - // UK Postcode specific - private String Addr; // Full address in one variable - private String CountryCode; // Two Letter ISO Country Code - private String TradCounty; // Traditional County (Region) - private String AdminCounty; // Administrative County - private String LonLocation; // London Location - - public int size() - { - return 1; - } - - public String getAddr() - { - return Addr; - } - - public void setAddr(String newAddr) - { - Addr = newAddr; - } - - public String getStreet1() - { - return Street1; - } - - public void setStreet1(String newStreet1) - { - Street1 = newStreet1; - } - public String getStreet2() - { - return Street2; - } - - public void setStreet2(String newStreet2) - { - Street2 = newStreet2; - } - public String getStreet3() - { - return Street3; - } - - public void setStreet3(String newStreet3) - { - Street3 = newStreet3; - } - public String getStreet4() - { - return Street4; - } - - public void setStreet4(String newStreet4) - { - Street4 = newStreet4; - } - - public String getCity() - { - return City; - } - - public void setCity(String newCity) - { - City = newCity; - } - - public String getRegion() - { - return Region; - } - - public void setRegion(String newRegion) - { - Region = newRegion; - } - public String getPostcode() - { - return Postcode; - } - - public void setPostcode(String newPostcode) - { - Postcode = newPostcode; - } - public String getCountry() - { - return Country; - } - - public void setCountry(String newCountry) - { - Country = newCountry; - } - public String getCountryCode() - { - return CountryCode; - } - - public void setCountryCode(String newCountryCode) - { - CountryCode = newCountryCode; - } - public String getTradCounty() - { - return TradCounty; - } - - public void setTradCounty(String newTradCounty) - { - TradCounty = newTradCounty; - } - public String getAdminCounty() - { - return AdminCounty; - } - - public void setAdminCounty(String newAdminCounty) - { - AdminCounty = newAdminCounty; - } - public String getLonLocation() - { - return LonLocation; - } - - public void setLonLocation(String newLonLocation) - { - LonLocation = newLonLocation; - } - -} diff --git a/client/src/org/compiere/grid/ed/VLocation.java b/client/src/org/compiere/grid/ed/VLocation.java index 945cd84644..7c250e73dc 100644 --- a/client/src/org/compiere/grid/ed/VLocation.java +++ b/client/src/org/compiere/grid/ed/VLocation.java @@ -36,8 +36,6 @@ import org.compiere.util.*; public class VLocation extends JComponent implements VEditor, ActionListener { - int m_WindowNo = 0; - /** * Constructor * @@ -57,7 +55,6 @@ public class VLocation extends JComponent // LookAndFeel.installBorder(this, "TextField.border"); this.setLayout(new BorderLayout()); - // Size this.setPreferredSize(m_text.getPreferredSize()); // causes r/o to be the same length int height = m_text.getPreferredSize().height; @@ -89,22 +86,7 @@ public class VLocation extends JComponent popupMenu.add(mDelete); } // VLocation - /** - * Constructor - * - * @param columnName column name - * @param mandatory mandatory - * @param isReadOnly read only - * @param isUpdateable updateable - * @param mLocation location model - */ - public VLocation(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, - MLocationLookup mLocation, int windowno) - { - this(columnName, mandatory, isReadOnly, isUpdateable, mLocation); - m_WindowNo = windowno; - - } + /** * Dispose */ @@ -287,7 +269,7 @@ public class VLocation extends JComponent // log.config( "actionPerformed - " + m_value); VLocationDialog ld = new VLocationDialog(Env.getFrame(this), - Msg.getMsg(Env.getCtx(), "Location"), m_value, m_WindowNo); + Msg.getMsg(Env.getCtx(), "Location"), m_value); ld.setVisible(true); m_value = ld.getValue(); // diff --git a/client/src/org/compiere/grid/ed/VLocationDialog.java b/client/src/org/compiere/grid/ed/VLocationDialog.java index c893a0ad24..6fbb22f7d8 100644 --- a/client/src/org/compiere/grid/ed/VLocationDialog.java +++ b/client/src/org/compiere/grid/ed/VLocationDialog.java @@ -26,9 +26,6 @@ import org.compiere.model.*; import org.compiere.swing.*; import org.compiere.util.*; -import org.adempiere.interfaces.*; -import org.adempiere.model.*; - /** * Dialog to enter Location Info (Address) * @@ -38,15 +35,6 @@ import org.adempiere.model.*; public class VLocationDialog extends CDialog implements ActionListener { - - /** Lookup result */ - //private Object[][] data = null; - - /** Lookup result header */ - private Object[] header = null; - - //private int m_WindowNo = 0; - /** * Constructor * @@ -54,10 +42,9 @@ public class VLocationDialog extends CDialog * @param title title (field name) * @param location Model Location */ - public VLocationDialog (Frame frame, String title, MLocation location, int WindowNo) + public VLocationDialog (Frame frame, String title, MLocation location) { super(frame, title, true); - //m_WindowNo = WindowNo; try { jbInit(); @@ -74,6 +61,7 @@ public class VLocationDialog extends CDialog setTitle(Msg.getMsg(Env.getCtx(), "LocationNew")); else setTitle(Msg.getMsg(Env.getCtx(), "LocationUpdate")); + // Current Country MCountry.setDisplayLanguage(Env.getAD_Language(Env.getCtx())); @@ -88,10 +76,7 @@ public class VLocationDialog extends CDialog // initLocation(); fCountry.addActionListener(this); - fOnline.addActionListener(this); AEnv.positionCenterWindow(frame, this); - - } // VLocationDialog private boolean m_change = false; @@ -118,7 +103,6 @@ public class VLocationDialog extends CDialog private CLabel lRegion = new CLabel(Msg.getMsg(Env.getCtx(), "Region")); private CLabel lPostal = new CLabel(Msg.getMsg(Env.getCtx(), "Postal")); private CLabel lPostalAdd = new CLabel(Msg.getMsg(Env.getCtx(), "PostalAdd")); - private CLabel lOnline = new CLabel(""); // dummy to use addLine without error.... private CTextField fAddress1 = new CTextField(20); // length=60 private CTextField fAddress2 = new CTextField(20); // length=60 private CTextField fAddress3 = new CTextField(20); // length=60 @@ -128,7 +112,6 @@ public class VLocationDialog extends CDialog private CComboBox fRegion; private CTextField fPostal = new CTextField(5); // length=10 private CTextField fPostalAdd = new CTextField(5); // length=10 - private CButton fOnline = new CButton(); // private GridBagConstraints gbc = new GridBagConstraints(); private Insets labelInsets = new Insets(2,15,2,0); // top,left,bottom,right @@ -208,10 +191,6 @@ public class VLocationDialog extends CDialog else if (s.startsWith("R") && m_location.getCountry().isHasRegion()) addLine(line++, lRegion, fRegion); } - - - addLine(line++, lOnline, fOnline); - // Country Last addLine(line++, lCountry, fCountry); @@ -225,19 +204,11 @@ public class VLocationDialog extends CDialog fCity.setText(m_location.getCity()); fPostal.setText(m_location.getPostal()); fPostalAdd.setText(m_location.getPostal_Add()); - fOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); if (m_location.getCountry().isHasRegion()) { lRegion.setText(m_location.getCountry().getRegionName()); fRegion.setSelectedItem(m_location.getRegion()); } - - // disable online if this country doesn't have post code lookup - if (m_location.getCountry().isPostcodeLookup()) - fOnline.setEnabled(true); - else - fOnline.setEnabled(false); - fCountry.setSelectedItem(country); } // Update UI @@ -266,9 +237,7 @@ public class VLocationDialog extends CDialog gbc.gridx = 1; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.NONE; - gbc.insets = fieldInsets; mainPanel.add(field, gbc); - } // addLine @@ -296,38 +265,11 @@ public class VLocationDialog extends CDialog // Modifier for Mouse selection is 16 - for any key selection 0 MCountry c = (MCountry)fCountry.getSelectedItem(); m_location.setCountry(c); - - // refresh online button for new country - if (c.isPostcodeLookup()) - fOnline.setEnabled(true); - else - fOnline.setEnabled(false); - - // update the region name if regions are enabled for this country - if (c.isHasRegion()) - { - lRegion.setText(c.getRegionName()); - fRegion.setSelectedItem(m_location.getRegion()); - - // TODO: fix bug that occurs when the new region name is shorter than the old region name - } - - // refrseh + // refrseh mainPanel.removeAll(); - initLocation(); fCountry.requestFocus(); // allows to use Keybord selection } - else if (e.getSource() == fOnline) - { - - // check to see if we have a postcode lookup plugin for this country - MCountry c = (MCountry)fCountry.getSelectedItem(); - if (c.isPostcodeLookup()) - { - lookupPostcode(c, fPostal.getText()); - } - } } // actionPerformed /** @@ -352,7 +294,7 @@ public class VLocationDialog extends CDialog } else m_location.setC_Region_ID(0); - // Save changes + // Save chnages m_location.save(); } // actionOK @@ -373,139 +315,5 @@ public class VLocationDialog extends CDialog { return m_location; } // getValue - /** - * lookupPostcode - * - * - * @param country - * @param postcode - * @return - */ - private String lookupPostcode(MCountry country, String postcode) - { - // Initialise the lookup class. - PostcodeLookupInterface pcLookup = null; - try { - PostcodeLookupInterface pcLookupTmp = (PostcodeLookupInterface) Class - .forName(country.getLookupClassName()).newInstance(); - pcLookup = pcLookupTmp.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - return "lookupAddress(): " + e.getMessage(); - } - - // remove any spaces from the postcode and convert to upper case - postcode = postcode.replaceAll(" ", "").toUpperCase(); - log.fine("Looking up postcode: " + postcode); - - // Lookup postcode on server. - pcLookup.setServerUrl(country.getLookupUrl()); - pcLookup.setClientID(country.getLookupClientID()); - pcLookup.setPassword(country.getLookupPassword()); - if (pcLookup.lookupPostcode(postcode)==1) // Success - fillLocation(pcLookup.getPostCodeData(), country); - else - return "Postcode Lookup Error"; - - return ""; - } - /** - * Fills the location field using the information retrieved from postcode - * servers. - * - * @param ctx - * Context - * @param pkeyData - * Lookup results - * @param windowNo - * Window No. - * @param tab - * Tab - * @param field - * Field - */ - private void fillLocation(HashMap postcodeData, MCountry country) { - - // If it's not empty warn the user. - if (fAddress1 != null || fAddress2 != null - || fAddress3 != null - || fAddress4 != null || fCity != null) { - String warningMsg = "Existing address information will be overwritten. Proceed?"; - String warningTitle = "Warning"; - int response = JOptionPane.showConfirmDialog(null, warningMsg, - warningTitle, JOptionPane.YES_NO_OPTION); - if (response == JOptionPane.NO_OPTION) - return; - } - - - Set pcodeKeys = postcodeData.keySet(); - Iterator iterator = pcodeKeys.iterator(); - header = null; - - // Allocate the header array - header = new Object[pcodeKeys.size()]; - - String headerStr = null; - - // need to check how many records returned - // TODO - check number of records returns - size() method is incorrect - if (pcodeKeys.size() > 2) - { - // TODO: Implement ResultData Grid and get return (for premises level data) - System.out.println("Too many postcodes returned from Postcode Lookup - need to Implement ResultData"); - } else - { - for (int i = 0; (headerStr = (iterator.hasNext() ? iterator.next() : null)) != null - || iterator.hasNext(); i++) { - header[i] = headerStr; - Postcode values = (Postcode) postcodeData.get(headerStr); - - // Overwrite the values in location field. - fAddress1.setText(values.getStreet1()); - fCity.setText(values.getCity()); - fPostal.setText(values.getPostcode()); - - // Do region lookup - if (country.isHasRegion()) - { - // get all regions for this country - MRegion[] regions = MRegion.getRegions(country.getCtx(), country.getC_Country_ID()); - - // If regions were loaded - if ( regions.length > 0) - { - // loop through regions array to attempt a region match - don't finish loop if region found - boolean found = false; - for (i = 0; i < regions.length && !found; i++) - { - - if (regions[i].getName().equals(values.getRegion()) ) - { - // found county - fRegion.setSelectedItem(regions[i]); - log.fine("Found region: " + regions[i].getName()); - found = true; - } - } - if (!found) - { - // add new region - MRegion region = new MRegion(country, values.getRegion()); - if (region.save()) - { - log.fine("Added new region from web service: " + values.getRegion()); - fRegion.setSelectedItem(values); - } else - log.severe("Error saving new region: " + region.getName()); - - } - } else - log.severe("Region lookup failed for Country: " + country.getName()); - - } - } - } - - } + } // VLocationDialog diff --git a/migration/320-trunk/014_postcode_lookup.sql b/migration/320-trunk/014_postcode_lookup.sql deleted file mode 100644 index 3325190f2b..0000000000 --- a/migration/320-trunk/014_postcode_lookup.sql +++ /dev/null @@ -1,62 +0,0 @@ ---- --- Feature 1741222 - Add Post code lookup infrastructure --- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335 --- - ---- Modify C_COUNTRY Table -ALTER TABLE C_COUNTRY ADD - IsPostcodeLookup CHAR(1) DEFAULT 'N' NOT NULL; -ALTER TABLE C_COUNTRY ADD - LookupClassname VARCHAR(255) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupClientID VARCHAR(50) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupPassword VARCHAR(50) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupUrl VARCHAR(100) DEFAULT NULL NULL; - --- Add Postcode Constraint -ALTER TABLE C_COUNTRY ADD CHECK (IsPostcodeLookup IN ('Y','N')); - --- Insert Element Definitions - -INSERT INTO ad_element VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:22', 100, 'IsPostcodeLookup', 'D', 'IsPostcodeLookup', 'IsPostcodeLookup', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:54', 100, 'LookupClassName', 'D', 'LookupClassName', 'LookupClassName', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:06', 100, 'LookupClientID', 'D', 'LookupClientID', 'LookupClientID', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:19', 100, 'LookupUrl', 'D', 'LookupUrl', 'LookupUrl', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', 100, '2007-06-22 02:04:31', 100, 'LookupPassword', 'D', 'LookupPassword', 'LookupPassword', NULL, NULL, NULL, NULL, NULL, NULL); - --- Insert Column Definitions -INSERT INTO ad_column VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:14:47', 100, 100, 'IsPostcodeLookup', NULL, NULL, 0, 'D', 'IsPostcodeLookup', 170, 20, NULL, NULL, 1, 'N', 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51000, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClassName', NULL, NULL, 0, 'D', 'LookupClassName', 170, 10, NULL, NULL, 255, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51001, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClientID', NULL, NULL, 0, 'D', 'LookupClientID', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51002, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupUrl', NULL, NULL, 0, 'D', 'LookupUrl', 170, 10, NULL, NULL, 100, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51003, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', '2007-06-22 02:05:17', 100, 100, 'LookupPassword', NULL, NULL, 0, 'D', 'LookupPassword', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51004, NULL, 'N', 'N', NULL, NULL); - --- Insert Field Definitions -INSERT INTO ad_field VALUES (51000, 0, 0, 'Y', '2007-06-19 23:17:05', 100, '2007-06-19 23:17:05', 100, 'IsPostcodeLookup', NULL, NULL, 'Y', 135, 51000, NULL, 'Y', NULL, 1, 'N', 220, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51001, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:31', 100, 'LookupClassName', NULL, NULL, 'Y', 135, 51001, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 255, 'N', 260, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51002, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:17', 100, 'LookupClientID', NULL, NULL, 'Y', 135, 51002, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 240, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51003, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:12', 100, 'LookupUrl', NULL, NULL, 'Y', 135, 51003, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 100, 'N', 230, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51004, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-22 02:07:11', 100, 'LookupPassword', NULL, NULL, 'Y', 135, 51004, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 250, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); - --- Update Sequences -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_element_id) + 1 - FROM ad_element - WHERE ad_element_id < 1000000) - WHERE NAME = 'AD_Element'; - -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_column_id) + 1 - FROM ad_column - WHERE ad_column_id < 1000000) - WHERE NAME = 'AD_Column'; - -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_field_id) + 1 - FROM ad_field - WHERE ad_field_id < 1000000) - WHERE NAME = 'AD_Field'; - -COMMIT; \ No newline at end of file diff --git a/migration/320-trunk/postgresql/014_postcode_lookup.sql b/migration/320-trunk/postgresql/014_postcode_lookup.sql deleted file mode 100644 index 3325190f2b..0000000000 --- a/migration/320-trunk/postgresql/014_postcode_lookup.sql +++ /dev/null @@ -1,62 +0,0 @@ ---- --- Feature 1741222 - Add Post code lookup infrastructure --- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335 --- - ---- Modify C_COUNTRY Table -ALTER TABLE C_COUNTRY ADD - IsPostcodeLookup CHAR(1) DEFAULT 'N' NOT NULL; -ALTER TABLE C_COUNTRY ADD - LookupClassname VARCHAR(255) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupClientID VARCHAR(50) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupPassword VARCHAR(50) DEFAULT NULL NULL; -ALTER TABLE C_COUNTRY ADD - LookupUrl VARCHAR(100) DEFAULT NULL NULL; - --- Add Postcode Constraint -ALTER TABLE C_COUNTRY ADD CHECK (IsPostcodeLookup IN ('Y','N')); - --- Insert Element Definitions - -INSERT INTO ad_element VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:22', 100, 'IsPostcodeLookup', 'D', 'IsPostcodeLookup', 'IsPostcodeLookup', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:54', 100, 'LookupClassName', 'D', 'LookupClassName', 'LookupClassName', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:06', 100, 'LookupClientID', 'D', 'LookupClientID', 'LookupClientID', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:19', 100, 'LookupUrl', 'D', 'LookupUrl', 'LookupUrl', NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO ad_element VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', 100, '2007-06-22 02:04:31', 100, 'LookupPassword', 'D', 'LookupPassword', 'LookupPassword', NULL, NULL, NULL, NULL, NULL, NULL); - --- Insert Column Definitions -INSERT INTO ad_column VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:14:47', 100, 100, 'IsPostcodeLookup', NULL, NULL, 0, 'D', 'IsPostcodeLookup', 170, 20, NULL, NULL, 1, 'N', 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51000, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClassName', NULL, NULL, 0, 'D', 'LookupClassName', 170, 10, NULL, NULL, 255, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51001, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClientID', NULL, NULL, 0, 'D', 'LookupClientID', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51002, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupUrl', NULL, NULL, 0, 'D', 'LookupUrl', 170, 10, NULL, NULL, 100, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51003, NULL, 'N', 'N', NULL, NULL); -INSERT INTO ad_column VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', '2007-06-22 02:05:17', 100, 100, 'LookupPassword', NULL, NULL, 0, 'D', 'LookupPassword', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51004, NULL, 'N', 'N', NULL, NULL); - --- Insert Field Definitions -INSERT INTO ad_field VALUES (51000, 0, 0, 'Y', '2007-06-19 23:17:05', 100, '2007-06-19 23:17:05', 100, 'IsPostcodeLookup', NULL, NULL, 'Y', 135, 51000, NULL, 'Y', NULL, 1, 'N', 220, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51001, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:31', 100, 'LookupClassName', NULL, NULL, 'Y', 135, 51001, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 255, 'N', 260, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51002, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:17', 100, 'LookupClientID', NULL, NULL, 'Y', 135, 51002, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 240, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51003, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:12', 100, 'LookupUrl', NULL, NULL, 'Y', 135, 51003, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 100, 'N', 230, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); -INSERT INTO ad_field VALUES (51004, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-22 02:07:11', 100, 'LookupPassword', NULL, NULL, 'Y', 135, 51004, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 250, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL); - --- Update Sequences -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_element_id) + 1 - FROM ad_element - WHERE ad_element_id < 1000000) - WHERE NAME = 'AD_Element'; - -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_column_id) + 1 - FROM ad_column - WHERE ad_column_id < 1000000) - WHERE NAME = 'AD_Column'; - -UPDATE ad_sequence - SET currentnextsys = (SELECT MAX (ad_field_id) + 1 - FROM ad_field - WHERE ad_field_id < 1000000) - WHERE NAME = 'AD_Field'; - -COMMIT; \ No newline at end of file