public List <Title> GetTitleList() { List <Title> titleList = new List <Title>(); try { PeopleBL people = new PeopleBL(_connString); DataTable tblTitle = new DataTable(); tblTitle = people.GetTitleList(); if (tblTitle != null && tblTitle.Rows.Count > 0) { titleList.Add(new Title() { Name = "", Value = "" }); foreach (DataRow row in tblTitle.Rows) { titleList.Add(new Title() { Name = Utils.DBNullToString(row["Person_Title"]), Value = Utils.DBNullToString(row["Person_Title"]) }); } } } catch (Exception ex) { throw ex; } return(titleList); }
public People(string connString, Guid person_ID) { _connString = connString; try { PeopleBL people = new PeopleBL(_connString); tblPeople = people.GetPersonByPerson_ID(person_ID); DataRow row = tblPeople.Rows[0]; _person_ID = person_ID; _person_Title = Utils.DBNullToString(row["Person_Title"]); _person_Surname = Utils.DBNullToString(row["Person_Surname"]); _person_Forename = Utils.DBNullToString(row["Person_Forename"]); _address_ID = Utils.DBNullToGuid(row["Address_ID"]); _person_Mobile = Utils.DBNullToString(row["Person_Mobile"]); _person_Landline = Utils.DBNullToString(row["Person_Landline"]); _person_Email = Utils.DBNullToString(row["Person_Email"]); _person_OE_Owner_ID = Utils.DBNullToLong(row["Person_OE_Owner_ID"]); } catch (Exception ex) { throw ex; } }
public List <People> GetPeopleBySurnameForenameEmail(string person_Surname, string person_Forename, string person_Email) { List <People> retVal = new List <People>(); try { PeopleBL people = new PeopleBL(_connString); tblPeople = people.GetPeopleBySurnameForenameEmail(person_Surname, person_Forename, person_Email); if (tblPeople != null && tblPeople.Rows.Count > 0) { foreach (DataRow row in tblPeople.Rows) { People person = new People(_connString, Utils.DBNullToGuid(row["Person_ID"])); retVal.Add(person); } } } catch (Exception ex) { throw ex; } return(retVal); }
public bool Update_Person(Guid person_ID, Guid user_ID) { bool retVal = false; try { PeopleBL people = new PeopleBL(_connString); retVal = people.Update_People(person_ID, _person_Title, _person_Surname, _person_Forename, _address_ID, _person_Mobile, _person_Landline, _person_Email, _deletePerson, user_ID, _person_OE_Owner_ID); } catch (Exception ex) { throw ex; } return(retVal); }
public Guid?Insert_Person(Guid user_ID) { Guid?retVal = null; try { PeopleBL people = new PeopleBL(_connString); retVal = people.Insert_People(_person_Title, _person_Surname, _person_Forename, _address_ID, _person_Mobile, _person_Landline, _person_Email, user_ID, _person_OE_Owner_ID); } catch (Exception ex) { throw ex; } return(retVal); }
public People(Guid person_ID) { PeopleBL people = new PeopleBL(); tblPeople = people.GetPersonByPerson_ID(person_ID); Person_ID = person_ID; if (!tblPeople[0].IsPerson_TitleNull()) Person_Title = tblPeople[0].Person_Title; if (!tblPeople[0].IsPerson_SurnameNull()) Person_Surname = tblPeople[0].Person_Surname; if (!tblPeople[0].IsPerson_ForenameNull()) Person_Forename = tblPeople[0].Person_Forename; if (!tblPeople[0].IsAddress_IDNull()) Address_ID = tblPeople[0].Address_ID; if (!tblPeople[0].IsPerson_MobileNull()) Person_Mobile = tblPeople[0].Person_Mobile; if (!tblPeople[0].IsPerson_LandlineNull()) Person_Landline = tblPeople[0].Person_Landline; if (!tblPeople[0].IsPerson_EmailNull()) Person_Email = tblPeople[0].Person_Email; }
public bool Update_Person(Guid person_ID, Guid user_ID) { bool success = false; PeopleBL people = new PeopleBL(); success = people.Update_People(person_ID, Person_Title, Person_Surname, Person_Forename, Address_ID, Person_Mobile, Person_Landline, Person_Email, DeletePerson, user_ID); return success; }
public Guid? Insert_Person(Guid user_ID) { PeopleBL people = new PeopleBL(); Guid? newID = people.Insert_People(Person_Title, Person_Surname, Person_Forename, Address_ID, Person_Mobile, Person_Landline, Person_Email, user_ID); return newID; }
public List<People> GetPeopleByPerson_Surname(string person_Surname) { List<People> peopleList = new List<People>(); PeopleBL people = new PeopleBL(); tblPeople = people.GetPeopleByPerson_Surname(person_Surname); if (tblPeople != null && tblPeople.Count > 0) { foreach (sss.tblPeopleRow row in tblPeople) { People person = new People(row.Person_ID); peopleList.Add(person); } } return peopleList; }
public List<People> GetPeopleByAddress_ID(Guid address_ID) { List<People> peopleList = new List<People>(); PeopleBL people = new PeopleBL(); tblPeople = people.GetPeopleByAddress_ID(address_ID); if (tblPeople != null && tblPeople.Count > 0) { foreach (sss.tblPeopleRow row in tblPeople) { People person = new People(row.Person_ID); peopleList.Add(person); } } return peopleList; }