static void InsertCompanyContactInformation(ReadOrganization_Result orgRecord) { /////////////////////////////// CompanyContactInformation //////////////////////////////////// CompanyContactInformation insertCompanyContactInformation = new CompanyContactInformation(); //Insert the company Phone, Fax, and URL info: //Phone: if (!string.IsNullOrEmpty(orgRecord.Phone)) { var result = _db.InsertCompanyContactInformation(_companyId, 14, orgRecord.Phone, null, null, 0); } //Fax: if (!string.IsNullOrEmpty(orgRecord.Fax)) { var result = _db.InsertCompanyContactInformation(_companyId, 13, orgRecord.Fax, null, null, 0); } //URL: if (!string.IsNullOrEmpty(orgRecord.URL)) { var result = _db.InsertCompanyContactInformation(_companyId, 11, orgRecord.URL, null, null, 0); } }
static void InsertCompanyMailingAddress(ReadOrganization_Result orgRecord) { /////////////////////////////// MailingAddress for a Company //////////////////////////////////// //If there is an address to insert: //Might want to insert an address for if (!string.IsNullOrEmpty(orgRecord.Address) && !string.IsNullOrEmpty(orgRecord.City) && !string.IsNullOrEmpty(orgRecord.State) && !string.IsNullOrEmpty(orgRecord.Zip)) { var result = _db.InsertCompanyMailingAddress(_companyId, orgRecord.Address, orgRecord.City, orgRecord.State, orgRecord.Zip, 0).ToList(); _companyMailingAddressId = Convert.ToInt32(result[0]); } }