From dc97ce2906f1e87b57b713d7fe4bfd808707110c Mon Sep 17 00:00:00 2001 From: RDeck Date: Thu, 29 May 2025 13:33:02 -0400 Subject: [PATCH] ! --- .vs/SummerBestWebForm2/v17/.suo | Bin 65024 -> 68608 bytes .../v17/DocumentLayout.backup.json | 48 +- .../v17/DocumentLayout.json | 48 +- Components/App.razor | 1 + Components/Pages/Home.razor | 723 +++++++++--------- Components/Pages/Home.razor.cs | 175 ++--- .../net8.0/SummerBestWebForm2.AssemblyInfo.cs | 2 +- ...ummerBestWebForm2.AssemblyInfoInputs.cache | 2 +- 8 files changed, 507 insertions(+), 492 deletions(-) diff --git a/.vs/SummerBestWebForm2/v17/.suo b/.vs/SummerBestWebForm2/v17/.suo index 24838c2700021343b6d2e63feee5f8dd94335c99..b757c30cbc3473c40981cc9571810c8683b3b523 100644 GIT binary patch delta 3711 zcmc(i3s6+o8OQHAySx^{Ll#*c!h%SY=Y_6-3);JaXpBjvJ_x=dkw+dpHp^<`V&tZ^ zNqj`$e%7>7D!ojTG-JoGHwGhMFBlCondvy4RvSAN6_e>`JCjV=IA)C7@4#IIjZ@P) z)5HAu&i9?~JnsLTy$|u0PW-vPjR(Fq$P~_TNgT)NklS9b7Y#=cv8ODKhK6@X_Wu6t zU&(A1E(aHNk(r8z1``qjL?73J9lX)l^av7*#3M5h6B30OkvJp>i9lF>4ccTR5D7(Q zB4J1{!d8F_;t~-(Vn$k!1jK;ML0m{Cf~oE0G4Q@VC27Hg%SQJWYV{(ti?n)ids!re z_!&thB>APstkJ^dnyt|6?e@yVC!RrP3sQwtBQZ!V@*Kj(e?hY;nr%Sah}e-A5hud( zSZQuAi#F}Vzz*bPgk9e(v_C;4S{Evw`t%sncOm+B^!1MGSCLY6($@#Ih{&2W+?*gB(yG=c~JH^A1&7QcGD z5}k50teM`wF)BdsHjWX$C|sNoZpJkGFUMX@5#Wk-krxzCtd5f3C^zE+h-{{E0+o`T z^eU%pOQwXX0pObLB2Mtk_7Wp_Qd&qPY@M@LN=#K!OD+&OjY_FbdKuGG_vqXiFA*Xr z+cRIIvW3cvsGLjXJSrDaw^dJ!Lpbdzp=ds+xs%E z>{+^4fBvfXjXJ zmHEp*A?_-kzDV+8Vx9i0aV93^ig77dcqxq{%2#oeFiBT7lY5j@JgZu$ zCK!=wqJkc4XmVE8)m2x4spexiTob3qAvri%lLQg9allhOh_%LPOpWn05Qb|De9~8- z^qZ)A2c@v{*+9im_m%Fy&|Z2`R%H7ooxE8Oxpn)LeLJ1x0ro(8y%f&0SV4SUB+Wo} z=jaSv3Tz%tQ7Ybeo5~x=L))A;1x096r*6)lAA*p|aIt1n~#I5mK*#*Xq-?5BHFUySBLT-yx$-GbZ89-9cw}CFv9a4Gxh8k!mf^aaXRiW zDY5eS*PO#I$;sm_>=rm)z~0Hj!mdE6cP?ain(iwhRP276;z=9oNZ0AP-$GZ{GG$>G zp0l@D6-UU&?x)GmG%r5D?r5xaRMvyDE1m4YXvMV1VT{a@_v^vz{-LhYZijiDS>yl) zt9)JY08;*PUv7(kpcD`eL9*wa(pEREBu7xcALq66w6;Re{3PK>^b5q>>0jDb4r** zOxQ<#ip)50_a|P*1Vi@aplD-p zW4*nxp}N7@wBbHEVRz*~*U`sf*<*U5nAFFy@`UD&)J@CyP&47PzA`8KS~CsJ@+G{Gln@$mlWK5+D(T(BV?mos3+|I5!S)yy|0%|&=Dm6+uRu~&_~Z4N%E5oVOQahK zkl;y9!e;#Nc?RFGYw^3q#x>x3wV5mCR&r}N_Hp$jZgnDvH;k})AcKU#D>owH$EPx+ mTShp1JRw0l57>b{Qg`*XazBVU)}8v#{-*2$x6|RQ%KsbnWJ0?D delta 3166 zcmd^>e^6A{702JXyXdkYVp)F071?zW1PqHqB5qI~h$4mAbFZIg7SG1X}QGUKE(N=L@%_It^yJK8pF zC;6+F`Mh)Px#!+{?)P2Ztai|>eQoMu6XR^Om>qEi znT-$9$Cg+b?Pmt+r_S7f&PLDzTwoKJ0yYDg{X*1kf!)f-l4^7zB3Ii1`x58|J-`Qc z0q(Qfg4RX$6vABssUQucgACvR++xjEop7cB7svs*K%O!Wb_U1?1)vbj1doFv;07MR z?^|8|r{I)or%DXZZGt1`IBYT=GJTcD#knD~Eucs)rBCV2&&=B{Kvz0V_fp5m@a{ z4U;jNd7I+aK{J~%nmXPbw0p<3W8jvReRdyhHAd_vL5Gadtns8fg`O>fF0WWj#txSt zF~h>X93P$Gk(>yv<&o)rTEktrKModpMKy8?_nY*5G3f3l$}@V3_ljV$_g_~sd%Vy~ zgzgc8RYxgLem3MMLtd0^QM(=XMbH`Tdtv#)0{7rNGX<+`oKgOK@)w9*0aw9a<#=Ct zhh8T1Ck5A+P3AjSEygtUbCaGYf=h137CpF-1YbE*Vmz_74Ice^cYS#--Izb%kj5y1SXz18l7PxqbJUtM|5b8_~z zy9Wxdz{e2Uu~2V!b*0Qvw3DlQyV+CI$iJ^~^LsVr`UatQm_*b}uyHgUgPyvsvrb z=o(W`u_-}uarUT-SN0syz2e{I7|0R&Yhuuc`xNZ`CI9M2!?cYne5GvtFqxO_o1S(J zZ&=;~N!v!nqcq`4xAGVMsodvx7;0~r;LPWbdv`oK8x_60&o{Q>5S1>G z`(V%Gx0zxOzkA01iBNQGcL;ag3jPU8O2x$?)+BvP?LSfd=&f=Z|)#&`qM`G|J z?1cg+JyM|Y=b=^Ndnkd`^Qxg<3{z|^j9P+!Q4Q^PDzSD+W&KPkul?Az@* QO66s9+PQg7OAPh@04+f6t^fc4 diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json index 882bfef..cd09454 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json @@ -2,13 +2,21 @@ "Version": 1, "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" } ], "DocumentGroupContainers": [ @@ -18,7 +26,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 11, + "SelectedChildIndex": 12, "Children": [ { "$type": "Bookmark", @@ -66,29 +74,55 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 1, "Title": "Home.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", "RelativeToolTip": "Components\\Pages\\Home.razor", - "ViewState": "AgIAAJgBAAAAAAAAAAAcwL4BAAAAAAAAAAAAAA==", + "ViewState": "AgIAABMAAAAAAAAAAAAAADEAAAAwAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "WhenOpened": "2025-05-29T13:04:23.98Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 0, "Title": "Home.razor.cs", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", "RelativeToolTip": "Components\\Pages\\Home.razor.cs", - "ViewState": "AgIAAKMBAAAAAAAAAAAcwLoBAAAvAAAAAAAAAA==", + "ViewState": "AgIAAF4AAAAAAAAAAAAAAGcAAAA+AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-05-29T14:37:32.314Z", "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "App.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", + "RelativeDocumentMoniker": "Components\\App.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", + "RelativeToolTip": "Components\\App.razor", + "ViewState": "AgIAACYAAAAAAAAAAAAYwEsAAABNAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-29T16:20:24.809Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-29T16:21:02.367Z", + "EditorCaption": "" } ] } diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.json index 882bfef..cd09454 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.json @@ -2,13 +2,21 @@ "Version": 1, "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, { - "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" } ], "DocumentGroupContainers": [ @@ -18,7 +26,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 11, + "SelectedChildIndex": 12, "Children": [ { "$type": "Bookmark", @@ -66,29 +74,55 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 1, "Title": "Home.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", "RelativeToolTip": "Components\\Pages\\Home.razor", - "ViewState": "AgIAAJgBAAAAAAAAAAAcwL4BAAAAAAAAAAAAAA==", + "ViewState": "AgIAABMAAAAAAAAAAAAAADEAAAAwAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "WhenOpened": "2025-05-29T13:04:23.98Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 0, "Title": "Home.razor.cs", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", "RelativeToolTip": "Components\\Pages\\Home.razor.cs", - "ViewState": "AgIAAKMBAAAAAAAAAAAcwLoBAAAvAAAAAAAAAA==", + "ViewState": "AgIAAF4AAAAAAAAAAAAAAGcAAAA+AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-05-29T14:37:32.314Z", "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "App.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", + "RelativeDocumentMoniker": "Components\\App.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", + "RelativeToolTip": "Components\\App.razor", + "ViewState": "AgIAACYAAAAAAAAAAAAYwEsAAABNAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-29T16:20:24.809Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-29T16:21:02.367Z", + "EditorCaption": "" } ] } diff --git a/Components/App.razor b/Components/App.razor index 86b8d5c..6665a28 100644 --- a/Components/App.razor +++ b/Components/App.razor @@ -73,6 +73,7 @@ } } +
@errMsg
@if (appState != null) { diff --git a/Components/Pages/Home.razor b/Components/Pages/Home.razor index 3f21d8a..0c4ac24 100644 --- a/Components/Pages/Home.razor +++ b/Components/Pages/Home.razor @@ -8,173 +8,173 @@ @if (ShowWizard) { -
-
-
- - - - - - - - + + + @* Need this here to avoid addition of random submit button *@ - - - - + + + + @* *@ @* Step 1 - plastic card vs postcard *@ @* *@ - - - - - - + + + @* Need this here to avoid addition of random submit button *@ - - - - + + + + @* *@ @* Step 2 - selecting card design *@ @* *@ - - - - - - - - - + + + + + + @* *@ @* Step 3 - For postcards, choose a verse and a signature *@ @* *@ - - - - - - + + + + + + @* *@ @* Step 4 - Logo Selection *@ @* *@ - - - - - - + + + + + + + @* *@ @* Step 5 - Offer selection for Plastic cards *@ @* *@ - - - - - - + + + + + + @* *@ @* Step 6 - Location information *@ @* *@ - - -
-
-
- - - -
-
- -
+ + +
+
+
+ + +
- - +
+
+
@* *@ @* Step 7 - Payment *@ @* *@ - - - - - - + + + + + + + + +
+
-
-
} else { -
-
-
- Thank you! -
-
-
+
+
+
+ Thank you! +
+
+
} \ No newline at end of file diff --git a/Components/Pages/Home.razor.cs b/Components/Pages/Home.razor.cs index 4ec6337..857bce2 100644 --- a/Components/Pages/Home.razor.cs +++ b/Components/Pages/Home.razor.cs @@ -4,6 +4,9 @@ using Telerik.Blazor; using Telerik.Blazor.Components; using Telerik.SvgIcons; using kmCommonLibsCore; +using System.Net.Http; +using System.Text.Json; +using Microsoft.Extensions.Options; namespace SummerBestWebForm2.Components.Pages; @@ -12,24 +15,26 @@ public partial class Home async Task OnFinishHandler() //private void SaveIt() { - using (var em = new kmCommonLibsCore.Emails()) + using (var em = new kmCommonLibsCore.Emails() { HandleOptOuts = false, SendMethod = enuSendMethod.OnsiteServer }) { // Parsing the submitted form to pull the relevant information - string cardType = isPostcard ? "Postcard" : "Plastic Card"; - string cardDesign = string.Empty; + var cardType = isPostcard ? "Postcard" : "Plastic Card"; + var cardDesign = string.Empty; if (designOne) cardDesign = "A"; else if (designTwo) cardDesign = "B"; else if (designThree) cardDesign = "C"; + else if (designCustom) + cardDesign = "CUSTOM"; // Postcard or Plastic specific options - string customizationInfo = string.Empty; + var customizationInfo = string.Empty; if (isPostcard) { - string verseChoice = string.Empty; - string sigChoice = string.Empty; + var verseChoice = string.Empty; + var sigChoice = string.Empty; if (verseOne) verseChoice = "1"; @@ -46,132 +51,40 @@ public partial class Home sigChoice = string.Format("Option F - {0}", customSignature); // combine these into customizationInfo - customizationInfo = string.Format("Verse: {0}
Signature: {1}", verseChoice, sigChoice); + customizationInfo = string.Format("Verse:{0}Signature:{1}", verseChoice, sigChoice); } else // isPlasticCard { - string smallOfferString = string.Empty; - string bigOfferString = string.Empty; + var smallOfferList = new List(); + var bigOfferList = new List(); - int[] smallIndexes = new int[4]; - int[] bigIndexes = new int[2]; - - int smallCount = 0; for (int index = 0; index < smallOffers.Length; index++) { if (smallOffers[index]) - { - smallIndexes[smallCount] = index; - smallCount++; - } + smallOfferList.Add(string.Format("B{0}", index)); } - - int bigCount = 0; for (int index = 0; index < bigOffers.Length; index++) { if (bigOffers[index]) - { - bigIndexes[bigCount] = index; - bigCount++; - } + bigOfferList.Add(string.Format("A{0}", index + 1)); } - foreach (int index in smallIndexes) - { - switch (index) - { - case 0: - smallOfferString = smallOfferString + "B1 "; - break; - case 1: - smallOfferString = smallOfferString + "B2 "; - break; - case 2: - smallOfferString = smallOfferString + "B3 "; - break; - case 3: - smallOfferString = smallOfferString + "B4 "; - break; - case 4: - smallOfferString = smallOfferString + "B5 "; - break; - case 5: - smallOfferString = smallOfferString + "B6 "; - break; - case 6: - smallOfferString = smallOfferString + "B7 "; - break; - case 7: - smallOfferString = smallOfferString + "B8 "; - break; - case 8: - smallOfferString = smallOfferString + "B9 "; - break; - case 9: - smallOfferString = smallOfferString + "B10 "; - break; - case 10: - smallOfferString = smallOfferString + "B11 "; - break; - case 11: - smallOfferString = smallOfferString + "B12 "; - break; - } - } - - foreach (int index in bigIndexes) - { - switch (index) - { - case 0: - bigOfferString = bigOfferString + "A1 "; - break; - case 1: - bigOfferString = bigOfferString + "A2 "; - break; - case 2: - bigOfferString = bigOfferString + "A3 "; - break; - case 3: - bigOfferString = bigOfferString + "A4 "; - break; - case 4: - bigOfferString = bigOfferString + "A5 "; - break; - case 5: - bigOfferString = bigOfferString + "A6 "; - break; - } - } - - customizationInfo = string.Format("Offers: {0} - {1}", bigOfferString, smallOfferString); + customizationInfo = string.Format("BIG Offers:{0}SMALL Offers:{1}", + string.Join(", ", bigOfferList), string.Join(", ", smallOfferList)); } // Logo info - string logos = string.Empty; - if (!goodyear && !michelin && !custom) - logos = "NA"; - else - { - if (goodyear) - { - logos += "Goodyear"; - if (michelin) - logos += ", Michelin"; - if (custom) - logos += ", Custom"; - } - else if (michelin) - { - logos += "Michelin"; - if (custom) - logos += ", Custom"; - } - else if (custom) - logos += "Custom"; - } + var logos = new List(); + if (goodyear) + logos.Add("Goodyear"); + if (michelin) + logos.Add("Michelin"); + if (custom) + logos.Add("Custom"); + if (logos.Count == 0) + logos.Add("NONE"); // Payment info string paymentMethod = string.Empty; @@ -187,16 +100,35 @@ public partial class Home em.AddAddress(enuAddressType.From, "support@keymotive.us", "Summer Growth Enrollment"); em.AddAddress(enuAddressType.To, "support@keymotive.us", "KeyMotive Support"); - string locInfoString = string.Format("
Location Name: {0}
Manager: {1}
Address: {2}
City: {3}
State: {4}
Zip: {5}

Phone Number: {6}
Contact Name: {7}
Contact Phone: {8}
Contact Email: {9}
", + var targetAudience = string.Format("Audience:{0}", string.IsNullOrWhiteSpace(audienceType) ? "NOTHING!" : audienceType); + var locInfoString = string.Format("Location Name:{0}" + + "Manager:{1}" + + "Address:{2}" + + "City:{3}" + + "State:{4}" + + "Zip:{5}" + + "Phone Number:{6}" + + "Contact Name:{7}" + + "Contact Phone:{8}" + + "Contact Email:{9}", locationInfo.LocationName, locationInfo.Manager, locationInfo.Address, locationInfo.City, locationInfo.State, locationInfo.Zip, locationInfo.PhoneNumber, locationInfo.ContactName, locationInfo.ContactPhone, locationInfo.ContactEmail); - string cardInfoString = string.Format("Card type: {0}, Design {1}

Customization Options:
{2}
Logos: {3}
", - cardType, cardDesign, customizationInfo, logos); + var cardInfoString = string.Format("Card type:{0}, Design {1}" + + "Customization Options:" + + "{2}" + + "Logos:{3}", + cardType, cardDesign, customizationInfo, string.Join(", ", logos)); - string paymentString = string.Format("Payment Method: {0}

Requested Quantity: {1}
Additional Comments: {2}", paymentMethod, requestedQuantity, additionalComments); - em.HtmlBody = "You have a new enrollment:
" + locInfoString + cardInfoString + paymentString + "
"; + if (int.TryParse(requestedQuantity, out _)) + requestedQuantity = string.Format("{0:#,##0}", int.Parse(requestedQuantity)); + + var paymentString = string.Format("Payment Method:{0}" + + "Requested Quantity:{1}" + + "Additional Comments:{2}", paymentMethod, requestedQuantity, additionalComments); + em.HtmlBody = "
You have a new enrollment:

" + + targetAudience + locInfoString + cardInfoString + paymentString + "
"; try { @@ -213,6 +145,7 @@ public partial class Home } #region "User Selections - Model" + public bool? IsAudienceChoiceValid { get; set; } = false; public bool? IsCardChoiceValid { get; set; } = false; @@ -319,7 +252,7 @@ public partial class Home public void OnCardChoiceStepChange(WizardStepChangeEventArgs args) { IsCardChoiceValid = true; // This is forced to be true but required nonetheless - + } public void OnDesignStepChange(WizardStepChangeEventArgs args) @@ -424,7 +357,7 @@ public partial class Home public class LocationInfo { - [Required,Display(Name ="Location Name")] + [Required, Display(Name = "Location Name")] public string LocationName { get; set; } = string.Empty; [Required, Display(Name = "Store Manager")] public string Manager { get; set; } = string.Empty; diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs index 6077f4e..552243e 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8d5f8fbc0b180ec316bb0694deca84493cd04c44")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bba2f28bcf896d983f52e111581ce2a65da9bc7c")] [assembly: System.Reflection.AssemblyProductAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyTitleAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache index 58deed3..0222577 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache @@ -1 +1 @@ -498c48e569ca977ccb10053e88c4f50ed1c99a69b6b43726cfc5e871d74b9091 +be988df5edd5a7019169378b5ebfacb2a2da0e7d7d3f8ebfb0e8795b082a956f