public void InsertName(Type867Name model) { using (var connection = new SqlConnection(_connectionString)) using (var command = connection.CreateCommand("csp867NameInsert")) { command.AddWithValue("@Header_Key", model.HeaderKey) .AddWithValue("@867_Key", model.HeaderKey) .AddWithValue("@EntityIdType", model.EntityIdType) .AddWithValue("@EntityName", model.EntityName) .AddWithValue("@EntityDuns", model.EntityDuns) .AddWithValue("@EntityIdCode", model.EntityIdCode) .AddWithValue("@ServiceAddress1", model.ServiceAddress1) .AddWithValue("@ServiceAddress2", model.ServiceAddress2) .AddWithValue("@ServiceCity", model.ServiceCity) .AddWithValue("@ServiceState", model.ServiceState) .AddWithValue("@ServiceZipCode", model.ServiceZipCode); if (connection.State != ConnectionState.Open) { connection.Open(); } command.ExecuteNonQuery(); } }
public Type867Name ParseName(XElement element, IDictionary <string, XNamespace> namespaces) { XNamespace empty; if (!namespaces.TryGetValue(string.Empty, out empty)) { empty = XNamespace.None; } var model = new Type867Name { EntityIdType = element.GetChildText(empty + "EntityIdType"), EntityName = element.GetChildText(empty + "EntityName"), EntityDuns = element.GetChildText(empty + "EntityDuns"), EntityIdCode = element.GetChildText(empty + "EntityIdCode"), ServiceAddress1 = element.GetChildText(empty + "ServiceAddress1"), ServiceAddress2 = element.GetChildText(empty + "ServiceAddress2"), ServiceCity = element.GetChildText(empty + "ServiceCity"), ServiceState = element.GetChildText(empty + "ServiceState"), ServiceZipCode = element.GetChildText(empty + "ServiceZipCode") }; return(model); }
public void InsertName(Type867Name model) { }