📄 IrbyImaging.UI.Models.Wages Class Documentation

Welcome to the detailed documentation for the Wages class in IrbyImaging.UI.Models. This document covers everything you need to know: from the purpose of the class to sample usage, UML diagrams, and property descriptions.


🗂 Table of Contents

  1. 🚀 Overview & Purpose
  2. 🔑 Class Definition
  3. 🧩 Dependencies & Technologies
  4. 📊 Properties (Data Model)
  5. 🧭 UML Class Diagram
  6. 💡 Sample Usage & Code Snippets
  7. 🎬 Usage Examples
  8. ✅ Conclusion

🚀 Overview & Purpose

The Wages class is a simple data model (POCO) in the IrbyImaging application’s UI layer. It encapsulates information about wage determinations for construction projects, including state, county, fringe benefits, and more.

  • Where it lives:
    IrbyImaging/UI/Models/Wages.cs

  • Primary role:
    Supply strongly-typed wage determination data to UI components, ViewModels, or serialization routines (e.g., JSON/XML).

  • Intended use cases:

    • Displaying wage determination details in forms or tables
    • Binding to MVVM ViewModels in WPF/WinForms
    • Passing wage data between layers (UI ↔ Services)

🔑 Class Definition

namespace IrbyImaging.UI.Models
{
    public class Wages
    {
        public string Category { get; set; }
        public string State { get; set; }
        public string County { get; set; }
        public string WageDeterminationNumber { get; set; }
        public string FringeBenefits { get; set; }
        public string ConstructionType { get; set; }
        public string Content { get; set; }
    }
}
  • Namespace: IrbyImaging.UI.Models
  • Access Modifier: public – accessible throughout the application.
  • Type: class – reference type used for data representation.

🧩 Dependencies & Technologies

Category Details
Language C# (.NET Core / .NET Framework)
Framework Any .NET UI framework (WPF, WinForms, ASP.NET MVC/Razor)
Serialization JSON.NET, System.Text.Json (for JSON/XML binding)
Patterns MVVM / MVC (this is a Model)

Note: No external NuGet packages are required specifically for this class.


📊 Properties (Data Model)

Each property is a public auto-implemented getter/setter, making the class ideal for data binding, serialization, and shallow copies.

Property Type Description
Category string The wage category (e.g., “Laborer”, “Equipment Operator”).
State string Two-letter state code (e.g., “CA”, “NY”).
County string County name associated with the wage determination.
WageDeterminationNumber string Unique identifier for the wage determination (e.g., “AZ20210025”).
FringeBenefits string Description or rate of fringe benefits (e.g., “$2.25/hr health & welfare”).
ConstructionType string Type of construction project (e.g., “Heavy”, “Highway”, “Residential”).
Content string Raw or formatted content details (could be a JSON/XML blob or plain text).

🧭 UML Class Diagram

classDiagram
    class Wages {
        +string Category
        +string State
        +string County
        +string WageDeterminationNumber
        +string FringeBenefits
        +string ConstructionType
        +string Content
    }

Legend:

  • + denotes public visibility.

💡 Sample Usage & Code Snippets

1. Instantiating the Model

var wages = new Wages
{
    Category               = "Laborer",
    State                  = "CA",
    County                 = "Los Angeles",
    WageDeterminationNumber= "CA20230001",
    FringeBenefits         = "$3.50/hr health & welfare",
    ConstructionType       = "Highway",
    Content                = "Includes general labor and equipment operator rates"
};

2. Serializing to JSON

using System.Text.Json;

string json = JsonSerializer.Serialize(wages, new JsonSerializerOptions
{
    WriteIndented = true
});
Console.WriteLine(json);

3. Binding in MVVM (WPF Example)

<!-- XAML -->
<TextBlock Text="{Binding SelectedWages.WageDeterminationNumber}" />
// ViewModel
public class WagesViewModel : INotifyPropertyChanged
{
    private Wages _selectedWages;
    public Wages SelectedWages
    {
        get => _selectedWages;
        set { _selectedWages = value; OnPropertyChanged(); }
    }
    // INotifyPropertyChanged implementation omitted for brevity
}

🎬 Usage Examples

  1. Displaying a List of Wage Determinations

    • Bind a List<Wages> to a DataGrid or ListView.
    • Automatically renders columns for Category, State, County, etc.
  2. Filtering by State/County

    • Use LINQ to filter a collection:
    var caWages = allWages
        .Where(w => w.State == "CA" && w.County.StartsWith("L"))
        .ToList();
    
  3. Exporting to CSV

    • Loop through a List<Wages> and write lines like:
    $"{w.Category},{w.State},{w.County},{w.WageDeterminationNumber},..."
    

✅ Conclusion

The Wages class is a lightweight, flexible data model designed to hold key wage determination data within the IrbyImaging UI layer. It:

  • Simplifies data binding in MVVM/MVC scenarios
  • Plays nicely with serialization libraries (JSON/XML)
  • Contains no business logic—ideal for separation of concerns

🎉 You’re now ready to integrate Wages into your IrbyImaging UI workflows!