Codebase analysis · CoreStory V3

Tailwind Traders Point of Sale

A point-of-sale application for a fictional retail chain, published by Microsoft as a legacy-migration sample. It exists as VB6, WinForms and ASP.NET versions, and the repository is archived.

Maintained by
Microsoft
License
MIT
Commit analyzed
362483bf215883330dae3aa0d443a5cd00f561ab
Rules extracted
2026-11-11
Extracted by CoreStory V3
180
verified business rules, each with a cited source quote
39
files that contain rules
3
capabilities
7
features
01 · Rules

Business rules, traced to source lines.

These 8 rules are a sample of the 180 CoreStory V3 extracted from Tailwind Traders Point of Sale. Each one links to the exact lines on GitHub at commit 362483b. The statement is CoreStory V3’s wording; the code excerpt is the source it cites.

validation
Source/Web/frmSales.cs

Payment can proceed only when the ticket has at least one item. When there are no items, the error "Error no items registered" is shown and the payment dialog is not opened.

  • 0 — item count must be greater than this to take payment
if (items.Count > 0)

Also cited: L185

validation
Source/Web/frmPayment.cs

A payment is added to the payments grid only if its parsed amount (currency/exponent number styles) is greater than 0; amounts of 0 or less are ignored.

  • 0 — payment amount must be greater than this threshold
if (Decimal.Parse(amount, NumberStyles.Currency | NumberStyles.AllowExponent) <= 0) { return; }
validation
Source/Web/frmPayment.cs

A credit card payment is recorded only when the first comma-separated field of the payment result string equals "SUCCESS"; otherwise the result is shown in a message box and no payment is added.

  • SUCCESS — required first result field for accepted credit payment
  • , — result string delimiter
string[] results = (string[]) resultString.Split(','); if (results[0] == "SUCCESS") { AddPayment(amount, "Credit", resultString); } else { Mobilize.Web.MessageBox.Show(resultString, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName); }
policy
Source/Web/frmPayment.cs

Payment can be finished (marked done and form hidden) only if the amount paid so far is greater than or equal to the transaction amount; otherwise a message says payment is not complete.

  • Payment is not complete. Press Cancel to Abort — message shown when payment is insufficient
if (m_paidSoFar >= m_transactionAmount) { m_paymentDone = true; this.Hide(); } else { Mobilize.Web.MessageBox.Show("Payment is not complete. Press Cancel to Abort", System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName); }
calculation
Source/Web/frmPayment.cs

Remaining amount is transaction amount minus paid so far. If paid so far exceeds the transaction amount, the payment group is hidden, the payment-ready label is shown, and change equals paid so far minus the transaction amount; otherwise change is 0, both shown in currency format.

  • C — currency display format
  • 0 — change when not overpaid
m_paidSoFar = SumPayments(); lblRemaining.Text = (m_transactionAmount - m_paidSoFar).ToString("C"); if (m_paidSoFar > m_transactionAmount) { gbPayments.Visible = false; lblPaymentReady.Visible = true; lblChange.Text = (m_paidSoFar - m_transactionAmount).ToString("C"); } else { lblChange.Text = (0).ToString("C"); }
calculation
Source/VB6/frmCashCount.frm

The cash drawer total is the sum of each denomination count multiplied by its face value: pennies 0.01, nickels 0.05, dimes 0.1, quarters 0.25, half dollars 0.5, ones 1, fives 5, tens 10, twenties 20, fifties 50 and hundreds 100. The result is shown in the total label.

  • 0.01 — penny value
  • 0.05 — nickel value
  • 0.1 — dime value
  • 0.25 — quarter value
  • 0.5 — half dollar value
  • 1 — one-dollar bill value
  • 5 — five-dollar bill value
  • 10 — ten-dollar bill value
  • 20 — twenty-dollar bill value
  • 50 — fifty-dollar bill value
  • 100 — hundred-dollar bill value
Total = Total + CCur(txtPennies) * 0.01 Total = Total + CCur(txtNickels) * 0.05 Total = Total + CCur(txtDimes) * 0.1 Total = Total + CCur(txtQuarters) * 0.25 Total = Total + CCur(txtHalfDollars) * 0.5 Total = Total + CCur(txtOnes) * 1 Total = Total + CCur(txtFives) * 5 Total = Total + CCur(txtTens) * 10 Total = Total + CCur(txtTwenties) * 20 Total = Total + CCur(txtFifties) * 50 Total = Total + CCur(txtHundreds) * 100
policy
Source/VB6/Main.bas

Saving a sale runs in a single database transaction: payments, items, and ticket completion are saved, then committed; on any error the transaction is rolled back and the sale returns False.

On Error GoTo ErrorDB Dim conn As New ADODB.Connection Set conn = OpenConnection() ' Start Transaction conn.BeginTrans ' Register payment For Each pay In payments Dim currentPayment As Payment Set currentPayment = pay SavePayment conn, CurrentTicketID, POSID, currentPayment Next ' Register items For Each item In items Dim currentItem As TicketItem Set currentItem = item SaveItem conn, CurrentTicketID, POSID, currentItem Next CompleteTicket conn, Total, taxes, POSID, UserID conn.CommitTrans conn.Close SaveSale = True Exit Function ErrorDB: conn.RollbackTrans conn.Close SaveSale = False
mapping
Source/Web/Main.cs

Payment types map to IDs: Cash=1, Check=2, Credit=3, Gift Card=4; any other type maps to 0.

  • Cash — payment type
  • 1 — ID for Cash
  • Check — payment type
  • 2 — ID for Check
  • Credit — payment type
  • 3 — ID for Credit
  • Gift Card — payment type
  • 4 — ID for Gift Card
  • 0 — default ID for unknown type
int result = 0; if (paymentType == "Cash") { result = 1; } else if (paymentType == "Check") { result = 2; } else if (paymentType == "Credit") { result = 3; } else if (paymentType == "Gift Card") { result = 4; }
02 · Capabilities

What the application does

3 capabilities and 7 features, as described by an earlier CoreStory V3 ingest of the same commit. These are descriptions, not the cited rules above.

Application Workflow and Navigation

Supports movement between application pages and temporary suspension of the active workflow.

  • Application Page Navigation: Enables navigation to an application page and observation of its paragraph content.
  • Pause Screen: Provides a user-facing pause interface.

Customer Management

Supports finding existing customers and adding new customer records.

  • Customer Addition: Provides a user-facing form for adding a customer.
  • Customer Search: Provides a user-facing component for searching customers.

Point-of-Sale Payment Operations

Supports payment-oriented register workflows, including cash handling and gift card interactions through numeric input.

  • Cash Count: Provides a user-facing cash counting component.
  • Gift Card Code Interface: Provides a user-facing interface for working with a gift card code.
  • Number Pad Input: Provides a number-pad interface for entering numeric values.
03 · Size

What was analyzed

  • C# · 86 files · 12,215 lines
  • CSS · 11 files · 2,001 lines
  • Visual Basic · 16 files · 1,418 lines
  • XML · 14 files · 1,390 lines
  • MSBuild script · 5 files · 500 lines
  • TypeScript · 21 files · 348 lines
  • JSON · 6 files · 266 lines
  • HTML · 11 files · 246 lines
  • Markdown · 4 files · 244 lines
  • Visual Studio Solution · 3 files · 124 lines
  • JavaScript · 2 files · 54 lines
  • Other (3 languages) · 5 files · 48 lines

Whole repository: 278 files. cloc 2.06 counts 18,854 lines of code in 184 of them (25,689 lines with comments and blanks).

04 · Source

Where this came from

Business rules extracted by CoreStory V3 from the public repository at commit 362483b on 2026-11-11. Capability descriptions from an earlier CoreStory V3 ingest of the same commit (2026-10-17).

Code excerpts are from the upstream repository and remain under its MIT license. CoreStory is not affiliated with or endorsed by Microsoft.

Want this for your own codebase?

Talk to us about mapping the business rules in your repositories.

Talk to an expert