Ejemplo n.º 1
0
 protected override Customer GetCustomer(string[] array)
 {
     return(new Customer
     {
         ImportedFrom = InputFileType.Eccube,
         Id = array[0],
         ShopId = EccubeShopId,
         NameKanji = Format.MergeIntoString(array, 1, 2),
         NameKana = KanaHelper.ToFullKana(Format.MergeIntoString(array, 3, 2)),
         Zip = Format.MergeIntoString(array, 6, 2, string.Empty),
         Prefecture = array[8],
         Address = Format.MergeIntoString(array, 8, 3, string.Empty),
         Email = array[11],
         Phone = Format.MergeIntoString(array, 12, 3, string.Empty),
         Sex = GetSex(array[18]),
         DateOfBirth = GetDateTime(array[20]),
         PointBalance = Format.GetInt32(array[24]),
         Note = array[25],
         DateRegistered = GetDateTime(array[26]),
         DateUpdated = GetDateTime(array[27]),
         EccubeData = new EccubeData
         {
             CompanyName = array[5],
             Fax = Format.MergeIntoString(array, 15, 3, string.Empty),
             Occupation = array[19],
             DateFirstPurchased = GetDateTime(array[21]),
             DateLastPurchased = GetDateTime(array[22]),
             TimesPurchased = Format.GetInt32(array[23]),
             SubscriptionType = EccubeSubscriptionTypeHelper.FromString(array[28]),
             EmailTarget = Format.GetNullableEnum <EccubeEmailTarget>(array[29]),
             Deleted = Format.GetBoolean(array[30]),
             ProductWarranty = Format.MergeIntoString(array, 31, 100)
         }
     });
 }
Ejemplo n.º 2
0
 protected override Customer GetCustomer(string[] array)
 {
     return(new Customer
     {
         ImportedFrom = InputFileType.TempoVisor,
         Id = array[1],
         ShopId = GetShopId(array[2]),
         NameKana = KanaHelper.ToFullKana(array[3]),
         Phone = array[4],
         CellPhone = array[5],
         NameKanji = array[6],
         Prefecture = TempoVisorPrefectureHelper.GetPrefecture(array[7]),
         Address = array[7],
         Zip = array[8],
         DateOfBirth = Format.GetDateTime(array[9]),
         DateRegistered = Format.GetDateTime(array[10]),
         Sex = Format.GetNullableEnum <Sex>(array[12]),
         Email = array[20],
         EmailMobile = array[21],
         Note = array[23],
         PointBalance = Format.GetInt32(array[26]),
         DateUpdated = Format.GetDateTime(array[43]),
         TempoVisorData = new TempoVisorData
         {
             CompanyCode = array[0],
             ExpirationDate = Format.GetDateTime(array[11]),
             Area = Format.GetInt32(array[13]),
             Black = null, // TODO: what are the possible values? Format.GetBoolean(array[14]),
             MemberRank = Format.GetInt32(array[15]),
             Status = Format.GetInt32(array[16]),
             MemberNumber = array[17],
             // 18 is skipped - date updated - using 43 instead
             DirectMailFlag = null, // TODO : what are the possible values? Format.GetBoolean(array[19]),
             EmailAccept = Format.GetNullableEnum <TempoVisorEmailAccept>(array[22]),
             PriceApplication = Format.GetInt32(array[24]),
             LastVisitedDate = Format.GetDateTime(array[25]),
             PointDeposited = Format.GetInt32(array[27]),
             LastPointIssued = Format.GetInt32(array[28]),
             LastPointIssuedDate = Format.GetDateTime(array[29]),
             LastPointUsed = Format.GetInt32(array[30]),
             LastPointUsedDate = Format.GetDateTime(array[31]),
             Fillers = Format.MergeIntoString(array, 32, 9),
             Operation = Format.GetNullableEnum <TempoVisorOperation>(array[41]),
             CutoutDate = Format.GetDateTime(array[42]),
         }
     });
 }