Exemple #1
0
 /// <summary>
 /// Create a new instance of a Province.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="code"></param>
 /// <param name="country"></param>
 /// <returns></returns>
 public static Entity.PimsProvinceState CreateProvince(short id, string code, Entity.PimsCountry country = null)
 {
     country ??= EntityHelper.CreateCountry(1, "CAN");
     return(new Entity.PimsProvinceState(code, country)
     {
         ProvinceStateId = id, ConcurrencyControlNumber = 1
     });
 }
Exemple #2
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
     });
 }
Exemple #3
0
 /// <summary>
 /// Creates a default list of Province.
 /// </summary>
 /// <param name="country"></param>
 /// <returns></returns>
 public static List <Entity.PimsProvinceState> CreateDefaultProvinces(Entity.PimsCountry country = null)
 {
     country ??= EntityHelper.CreateCountry(1, "CAN");
     return(new List <Entity.PimsProvinceState>()
     {
         new Entity.PimsProvinceState("ON", country)
         {
             ProvinceStateId = 1, ConcurrencyControlNumber = 1
         },
         new Entity.PimsProvinceState("BC", country)
         {
             ProvinceStateId = 2, ConcurrencyControlNumber = 1
         },
     });
 }