public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Code?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (VATNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Phone?.GetHashCode() ?? 0); return(hashCode); }
public Page CreateCustomer(string name, string vat) { Name.SendKeys(name); VATNumber.SendKeys(vat); SubmitBtn.Click(); if (driver.Title == "") { return(this); } var page = new CustomerListPage(driver); return(page); }
/// <summary> /// Check if the VAT number is valid or not /// </summary> /// <returns>True if the VAT number could be validated otherwise false</returns> public bool CheckVat() { if (string.IsNullOrEmpty(VATNumber) || string.IsNullOrEmpty(CountryCode)) { return(false); } //If the country code is AT for Austria we need a U before the UID if (CountryCode.ToUpper().Equals("AT")) { if (!VATNumber.StartsWith("U")) { VATNumber = "U" + VATNumber; } } string strVat = VATNumber; string strCountry = CountryCode; bool bValid = false; string strName = string.Empty; string strAddress = string.Empty; try { checkVatService visService = new checkVatService(); RetDate = visService.checkVat(ref strCountry, ref strVat, out bValid, out strName, out strAddress); IsValid = bValid; Name = strName; Address = strAddress; return(IsValid); } catch (Exception err) { System.Diagnostics.Trace.TraceError(err.ToString()); return(false); } }
/// <summary> /// Check if the VAT number is valid or not /// </summary> /// <returns>True if the VAT number could be validated otherwise false</returns> public bool CheckVat() { if (string.IsNullOrEmpty(VATNumber) || string.IsNullOrEmpty(CountryCode)) { Log.Instance.LogDebug("CheckVat() FALSE: string.IsNullOrEmpty(VATNumber) || string.IsNullOrEmpty(CountryCode)"); return(false); } //If the country code is AT for Austria we need a U before the UID if (CountryCode.ToUpper().Equals("AT")) { if (!VATNumber.StartsWith("U")) { VATNumber = "U" + VATNumber; } } string strVat = VATNumber; string strCountry = CountryCode; try { var visService = new checkVatService(); bool bValid; string strName; string strAddress; RetDate = visService.checkVat(ref strCountry, ref strVat, out bValid, out strName, out strAddress); IsValid = bValid; Name = strName; Address = strAddress; Log.Instance.LogDebug("CheckVat() IsValid: " + IsValid); return(IsValid); } catch (Exception err) { Trace.TraceError(err.ToString()); Log.Instance.LogDebug("CheckVat() FALSE: EXCEPTION"); return(false); } }