Skip to content

Commit 8b6d48d

Browse files
authored
Merge pull request #541 from bcgov/yj
chore: bl upload
2 parents 6617ffe + 8d94e14 commit 8b6d48d

File tree

2 files changed

+104
-12
lines changed

2 files changed

+104
-12
lines changed

server/StrDss.Common/CommonUtils.cs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
using System.IO.Compression;
22
using System.Reflection;
3+
using System.Text.RegularExpressions;
34

45
namespace StrDss.Common
56
{
67
public static class CommonUtils
78
{
89
public static string GetFullName(string firstName, string lastName)
910
{
10-
if (firstName.IsNotEmpty() && lastName.IsNotEmpty())
11-
{
12-
return $"{lastName}, {firstName}";
13-
}
14-
else if (firstName.IsNotEmpty())
15-
{
16-
return firstName;
17-
}
18-
else
19-
{
20-
return lastName;
21-
}
11+
return string.IsNullOrEmpty(lastName)
12+
? $"{firstName?.Trim() ?? string.Empty}"
13+
: $"{lastName.Trim()}, {firstName?.Trim() ?? string.Empty}";
2214
}
2315

2416
public static T CloneObject<T>(T obj)
@@ -79,5 +71,12 @@ public static byte[] CreateZip(string csvContent, string fileName)
7971

8072
return memoryStream.ToArray();
8173
}
74+
75+
static string SanitizeAndUppercaseString(string input)
76+
{
77+
if (string.IsNullOrWhiteSpace(input)) return "";
78+
79+
return Regex.Replace(input, @"[^a-zA-Z0-9]", "").ToUpper();
80+
}
8281
}
8382
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
using CsvHelper.Configuration.Attributes;
2+
3+
namespace StrDss.Model
4+
{
5+
public class BizLicenseRowUntyped
6+
{
7+
[Name("org_cd")]
8+
public string LocalGovernmentCode { get; set; }
9+
10+
[Name("bus_lic_no")]
11+
public string LicenceNumber { get; set; }
12+
13+
[Name("bus_lic_exp_dt")]
14+
public string LicenceExpiryDate { get; set; }
15+
16+
[Name("rental_address")]
17+
public string STRAddress { get; set; }
18+
19+
[Name("bus_lic_status")]
20+
public string LicenceStatus { get; set; }
21+
22+
[Name("bus_lic_type")]
23+
public string LicenceType { get; set; }
24+
25+
[Name("restriction_txt")]
26+
public string RestrictionNote { get; set; }
27+
28+
[Name("business_nm")]
29+
public string BusinessName { get; set; }
30+
31+
[Name("mail_street_addr_txt")]
32+
public string MailingAddress { get; set; }
33+
[Name("mail_city_nm")]
34+
public string MailingCity { get; set; }
35+
36+
[Name("mail_province_cd")]
37+
public string MailingProvince { get; set; }
38+
39+
[Name("postal_cd")]
40+
public string MailingPostalCode { get; set; }
41+
42+
[Name("owner_nm")]
43+
public string OwnerName { get; set; }
44+
45+
[Name("owner_phone")]
46+
public string OwnerPhone { get; set; }
47+
48+
[Name("owner_email")]
49+
public string OwnerEmail { get; set; }
50+
51+
[Name("operator_nm")]
52+
public string OperatorName { get; set; }
53+
54+
[Name("operator_phone")]
55+
public string OperatorPhone { get; set; }
56+
57+
[Name("operator_email")]
58+
public string OperatorEmail { get; set; }
59+
60+
[Name("infraction_txt")]
61+
public string Infraction { get; set; }
62+
63+
[Name("infraction_dt")]
64+
public string InfractionDate { get; set; }
65+
66+
[Name("property_zone_txt")]
67+
public string PropertyZoning { get; set; }
68+
69+
[Name("bedrooms_qty")]
70+
public string BedroomsAvailable { get; set; }
71+
72+
[Name("max_guests_qty")]
73+
public string GuestsAllowed { get; set; }
74+
75+
[Name("is_principal_res_yn")]
76+
public string IsPrincipalResidence { get; set; }
77+
78+
[Name("is_owner_onsite_yn")]
79+
public string IsOwnerOnsite { get; set; }
80+
81+
[Name("is_owner_tenant_yn")]
82+
public string IsOwnerTenant { get; set; }
83+
84+
[Name("folio_no")]
85+
public string FolioNumber { get; set; }
86+
87+
[Name("pid_no")]
88+
public string ParcelIdentifier { get; set; }
89+
90+
[Name("legal_desc_txt")]
91+
public string LegalDescription { get; set; }
92+
}
93+
}

0 commit comments

Comments
 (0)