private void UpdateAddress() { //"CustNo,CustName,[pCustomerAddressID],[Type],[fCustomerMasterID],[Name2],[AddrLine1],[AddrLine2],[AddrLine3], //[AddrLine4],[AddrLine5],[City],[State],[PostCd],[Country],[PhoneNo],[CustContacts],[fCustContactsID], //[UPSZone],[FaxPhoneNo],[EDIPhoneNo],[UPSShipperNo],[Email],CustomerAddress.[EntryID], //CustomerAddress.[EntryDt],CustomerAddress.[ChangeID],CustomerAddress.[ChangeDt], //CustomerAddress.[StatusCd],[LocationName]"; string custId = (Type == "ST") ? BillCustomerID : newCustID; string AddressType = ""; string updateString = "Type='" + GetAddressType() + "'," + "Name1='" + txtCustName.Text.Replace("'", "''") + "'," + "Name2='" + txtCustName2.Text.Replace("'", "''") + "'," + "AddrLine1='" + txtAddress1.Text.Replace("'", "''") + "'," + "AddrLine2='" + txtAddress2.Text.Replace("'", "''") + "'," + "City='" + txtCity.Text.Replace("'", "''") + "'," + "State='" + txtState.Text.Replace("'", "''") + "'," + "PostCd='" + txtPostCode.Text.Replace("'", "''") + "'," + "Country='" + txtCountry.Text.Replace("'", "''") + "'," + "PhoneNo='" + txtPhone.GetPhoneNumber.Replace("'", "''") + "'," + "ChangeDt='" + DateTime.Now.ToShortDateString() + "'," + "ChangeID='" + Session["UserName"].ToString().Replace("'", "''") + "'"; customerDetails.UpdateAddressDetails(updateString, "pCustomerAddressID='" + AddressID + "'"); }