public registerForm() { regClient = new DBClient(); cryptSvc = new Crypto(); newCustomer = new Customer(); newAddress = new BillingAddress(); InitializeComponent(); }
public Customer() { this.firstName = ""; this.middleName = ""; this.lastName = ""; this.suffix = ""; this.eMailAddr = ""; this.userName = ""; this.gender = 'x'; this.phoneNum = "-1"; this.customerAddress = null; this.customerPlayer = null; }
public void setAddress(BillingAddress inputAddress) { this.customerAddress = inputAddress; }
public void insertNewAddress(BillingAddress newAddress, String eMail) { inputString = "INSERT INTO Address (Email_Address,Address_1,Address_2,City,County,State,Country,Continent,Zip_Code) VALUES " + "(\'" + eMail + "\',\'" + newAddress.getAddressLine1() + "\',\'" + newAddress.getAddressLine2() + "\',\'" + newAddress.getCity() + "\',\'" + newAddress.getCounty() + "\',\'" + newAddress.getState() + "\',\'" + newAddress.getCountry() + "\',\'" + newAddress.getContinent() + "'," + newAddress.getZipCode() + ");"; sqlComm.CommandText = inputString; try { sqlComm.ExecuteNonQuery(); } catch(MySqlException sqle) { MessageBox.Show("Error " + sqle.Number + " has occurred: " + sqle.Message + ".", "Registration Form", MessageBoxButtons.OK, MessageBoxIcon.Error); } }