public static Address CreateSavedAddress(ContactPerson contactPerson) { Address address = CreateUnsavedAddress(contactPerson); address.Save(); return(address); }
public static ContactPerson CreateSavedContactPerson(string surname) { ContactPerson cp = CreateUnsavedContactPerson(surname); cp.Save(); return(cp); }
public static Address CreateSavedAddress(ContactPerson contactPerson, string firstLine) { Address address = CreateUnsavedAddress(contactPerson, firstLine); address.Save(); return(address); }
public static Car CreateSavedCar(string regno, ContactPerson owner) { Car car = CreateUnsavedCar(regno, owner); car.Save(); return(car); }
private static ContactPerson CreateUnsavedContactPerson(string surname, string firstName) { ContactPerson cp = new ContactPerson(); cp.FirstName = firstName; cp.Surname = surname; return(cp); }
public static ContactPerson CreateSavedContactPerson() { new Engine(); new Car(); ContactPerson cp = CreateUnsavedContactPerson(); cp.Save(); return(cp); }
public static Engine CreateEngineWithCarWithContact(out string surname, out string regno, out string engineNo) { regno = TestUtil.GetRandomString(); engineNo = TestUtil.GetRandomString(); surname = TestUtil.GetRandomString(); ContactPerson owner = ContactPerson.CreateSavedContactPerson(surname); Car car = Car.CreateSavedCar(regno, owner); return(CreateSavedEngine(car, engineNo)); }
private static Car CreateUnsavedCar(string regno, ContactPerson owner) { Car car = new Car(); if (owner != null) { car.OwnerID = owner.ContactPersonID; } car.CarRegNo = regno; return(car); }
/// <summary> /// returns the ContactPerson identified by id. /// </summary> /// <remarks> /// If the Contact person is already leaded then an identical copy of it will be returned. /// </remarks> /// <param name="id">The object primary Key</param> /// <returns>The loaded business object</returns> /// <exception cref="BusObjDeleteConcurrencyControlException"> /// if the object has been deleted already</exception> public static ContactPerson GetContactPerson(IPrimaryKey id) { //ContactPerson myContactPerson = null; //if (BusinessObjectManager.Instance.Contains(id)) //{ // myContactPerson = (ContactPerson) BusinessObjectManager.Instance[id]; //} //if (myContactPerson == null) //{ ContactPerson myContactPerson = BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObject <ContactPerson>(id); // } return(myContactPerson); }
private static Address CreateUnsavedAddress(ContactPerson contactPerson) { return CreateUnsavedAddress(contactPerson.ContactPersonID); }
private static Address CreateUnsavedAddress(ContactPerson contactPerson, string firstLine) { return CreateUnsavedAddress(contactPerson.ContactPersonID, firstLine); }
public static Address CreateSavedAddress(ContactPerson contactPerson) { Address address = CreateUnsavedAddress(contactPerson); address.Save(); return address; }
public static Address CreateSavedAddress(ContactPerson contactPerson, string firstLine) { Address address = CreateUnsavedAddress(contactPerson, firstLine); address.Save(); return address; }
public static Car CreateSavedCar(string regno, ContactPerson owner) { Car car = CreateUnsavedCar(regno, owner); car.Save(); return car; }
private static Address CreateUnsavedAddress(ContactPerson contactPerson, string firstLine) { return(CreateUnsavedAddress(contactPerson.ContactPersonID, firstLine)); }
private static Car CreateUnsavedCar(string regno, ContactPerson owner) { Car car = new Car(); if (owner != null) car.OwnerID = owner.ContactPersonID; car.CarRegNo = regno; return car; }
private static Address CreateUnsavedAddress(ContactPerson contactPerson) { return(CreateUnsavedAddress(contactPerson.ContactPersonID)); }
private static ContactPerson CreateUnsavedContactPerson(string surname, string firstName) { ContactPerson cp = new ContactPerson(); cp.FirstName = firstName; cp.Surname = surname; return cp; }