Guest User

Untitled

a guest
Feb 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public void updateTaxZone(){
  2. var address = (LocationExtAddress)Base.DefLocation.Select();
  3. if (!string.IsNullOrEmpty(address.PostalCode))
  4. {
  5. var taxZoneZip = PXSelect<TaxZoneZip,
  6. Where<TaxZoneZip.zipCode, Equal<Required<TaxZoneZip.zipCode>>>>
  7. .Select(Base, address.PostalCode)
  8. .RowCast<TaxZoneZip>().OrderBy(z => z.TaxZoneID).FirstOrDefault();
  9. if (taxZoneZip != null && taxZoneZip.TaxZoneID != "EXEMPT")
  10. {
  11. DefLocation.CTaxZoneID = taxZoneZip.TaxZoneID; ;
  12. }
  13. }
  14. return;
  15. }
Add Comment
Please, Sign In to add comment