コード例 #1
0
ファイル: AddressInformation.ascx.cs プロジェクト: 2Nifty/PFC
        private void InsertAddress()
        {
            string addType      = GetAddressType();
            string columnName   = "Type,fCustomerMasterID,Name1,Name2,AddrLine1,AddrLine2,City,State,PostCd,Country,PhoneNo,EntryDt,EntryID";
            string updateString = "'" + addType + "'," +
                                  "'" + newCustID + "'," +
                                  "'" + txtCustName.Text.Replace("'", "''") + "'," +
                                  "'" + txtCustName2.Text.Replace("'", "''") + "'," +
                                  "'" + txtAddress1.Text.Replace("'", "''") + "'," +
                                  "'" + txtAddress2.Text.Replace("'", "''") + "'," +
                                  "'" + txtCity.Text.Replace("'", "''") + "'," +
                                  "'" + txtState.Text.Replace("'", "''") + "'," +
                                  "'" + txtPostCode.Text.Replace("'", "''") + "'," +
                                  "'" + txtCountry.Text.Replace("'", "''") + "'," +
                                  "'" + txtPhone.GetPhoneNumber.Replace("'", "''") + "'," +
                                  "'" + DateTime.Now.ToShortDateString() + "'," +
                                  "'" + Session["UserName"].ToString().Replace("'", "''") + "'";

            AddressID = customerDetails.InsertAddressDetails(columnName, updateString);
        }