Server side with C# to store list objects results from database and display in Razor client-side page with HTML table
What you'll learn
Add the Business One SDK library to Visual Studio 2022
Connection paramaters to Business One database
Execute query and store results in a List type of objects
Display the list of results in Razor client HTML table.
Requirements
Basic web programming with databases.
Description
This course is in the next generation of web development using Visual Studio 2022 with Razor technology. Razor separates the development into the server and client tiers. The server C# code executes the query and stores results in a list type of objects. The client Razor HTML page loop thru this list to display the query results in table elements. We will cover the addition of the Business One SDK library to the Visual Studio IDE. Explanation of the parameters to connect to the database. In this exercise, we are using a Hana-type database for Business One. B1 can use SQL server and Sybase as databases. Razor architecture requires storing the query database results in a list type of objects. This list is looping in the Razor HTML side to present the results in table elements with headings and details. Pass parameter to another Razor page to run another query with a dynamic value. In this example, we pass the document number of an invoice and account receivable from a client to get the payments done up to date. It is important to keep in mind that the queries in B1 SDK must have an escape character of the apostrophes ("). That is because we have to specify the table name and the field name. The field name is enclosed in apostrophes.
Overview
Section 1: Introduction
Lecture 1 Introduction
Section 2: Business One SDK connection to the database
Lecture 2 Connection parameters and use of SDK library in the Visual Stutio 2022 IDE
Section 3: Define List variable to store columns values from the database query results
Lecture 3 Class with resultset columns and add into a List of objects
Section 4: Query execution
Lecture 4 Resultset to execute the query to the database. Get the accounts receivables.
Section 5: Display the results from the database in the HTML page
Lecture 5 HTML page to display the query results.
Section 6: Pass a GET parameter to another Razor page
Lecture 6 Passing parameters to another razor page
Section 7: Conclusions
Lecture 7 Review of client and server code execution in Razor
Developers of SAP Business One to present a next generation web applications using Razor.
Download Links