The default configuration uses LocalDB. Update the connection string based on your environment.
4
Restore dependencies
Install the required NuGet packages:
dotnet restore
5
Run the application
Start the development server:
dotnet run
The application will start on https://localhost:5001 (or the port specified in your launch settings).
info: Microsoft.Hosting.Lifetime[14] Now listening on: https://localhost:5001info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down.
Once the application is running, follow these steps to log your first label printing incident:
1
Navigate to the application
Open your browser and go to https://localhost:5001
2
Search for label data
Enter a serial number in the search field to retrieve label information from the Oracle Support Dashboard.The application will call the Oracle Support Dashboard API:
[HttpPost]public async Task<IActionResult> GetReportData([FromBody] SearchParameters parameters){ var requestUrl = $"{BaseUrl}GetReportData?id=2154¶meters={{\"serial_number\":\"{parameters.SerialNumber}\"}}"; var response = await _httpClient.PostAsync(requestUrl, null); if (response.IsSuccessStatusCode) { var jsonResult = await response.Content.ReadAsStringAsync(); return Json(jsonResult); } // Error handling...}
3
Review the retrieved data
The application will display label information including:
Serial Number
Job details
Item and Description
Order Number and Line
LPN (License Plate Number)
Tag Number
Ship Code
Subinventory
Full Address
4
Save the incident
Click the save button to log the incident to the database. The data is saved using:
var builder = WebApplication.CreateBuilder(args);// Add services to the containerbuilder.Services.AddControllersWithViews();builder.Services.AddHttpClient(); // For Oracle Support Dashboard API callsvar app = builder.Build();// Configure the HTTP request pipelineif (!app.Environment.IsDevelopment()){ app.UseExceptionHandler("/Home/Error"); app.UseHsts();}app.UseHttpsRedirection();app.UseStaticFiles();app.UseRouting();app.UseAuthorization();app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}");app.Run();
The application uses the standard ASP.NET Core MVC pattern with controllers handling HTTP requests and Razor views for the UI.