Esempio n. 1
0
 /// <summary>
 /// Create a new instance of an Address.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="address"></param>
 /// <param name="unitNumber"></param>
 /// <param name="municipality"></param>
 /// <param name="province"></param>
 /// <param name="district"></param>
 /// <param name="postal"></param>
 /// <returns></returns>
 public static Entity.PimsAddress CreateAddress(long id, string address, string unitNumber, string municipality, Entity.PimsProvinceState province = null, Entity.PimsDistrict district = null, string postal = "V9V9V9")
 {
     province ??= EntityHelper.CreateProvince((short)id, "BC", EntityHelper.CreateCountry((short)id, "CAN"));
     district ??= EntityHelper.CreateDistrict((short)id, "District 1");
     municipality ??= "municipality";
     return(new Entity.PimsAddress(address, unitNumber, municipality, province, district, postal)
     {
         AddressId = id,
         ConcurrencyControlNumber = 1
     });
 }