mirror of
https://github.com/stokebob/BealeEngineering.git
synced 2026-03-21 07:37:16 +00:00
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BealeEngineering.Core.Test.Contact
|
|
{
|
|
public class Contact
|
|
{
|
|
public Contact(string sqlConnectionString)
|
|
{
|
|
SqlConnectionString = sqlConnectionString;
|
|
|
|
ContactIdList = new List<int>
|
|
{
|
|
23, 18, 5
|
|
};
|
|
|
|
EmailAddressList = new List<string>
|
|
{
|
|
"phil.kennerley@gardiners.uk.com",
|
|
"patricia.snook@severntrent.co.uk",
|
|
"david.lane@severntrent.co.uk"
|
|
};
|
|
|
|
// put method to run here
|
|
ValidateContact();
|
|
|
|
}
|
|
private string SqlConnectionString { get; set; }
|
|
public List<int> ContactIdList { get; set; }
|
|
public List<string> EmailAddressList { get; set; }
|
|
|
|
public void ReadContactHeader()
|
|
{
|
|
var inst = new Data.Database.Contact.ReadContact(SqlConnectionString);
|
|
//var result = inst.ByContactId(ContactIdList);
|
|
//var result = inst.ByEmailAddress(EmailAddressList);
|
|
}
|
|
public void ValidateContact()
|
|
{
|
|
var inst = new Data.Database.Contact.ReadContact(SqlConnectionString);
|
|
var result = inst.ByContactName("Ben Broughton");
|
|
result.PostalAddress.AddressLine1 = " ";
|
|
bool isValid = result.IsValid();
|
|
var errorList = result.ValidationResults;
|
|
}
|
|
}
|
|
}
|