Blog

  • Understand tag helpers and page handlers

    In the previous unit, you created a Razor Page that displays a list of pizzas. You used the @ symbol to switch contexts between HTML and C#. In this unit, you’ll learn about tag helpers. Tag helpers are a special kind of HTML element that can contain C# code. You’ll also learn about page handlers. Page handlers are methods that handle browser requests. You’ll use page handlers in the next unit to add and delete pizzas.

    ibm infosphere datastage training courses malaysia

    Tag helpers

    Tag helpers are used to address the inefficiencies of context switching between HTML and C#. Most of ASP.NET Core’s built-in Tag helpers extend standard HTML elements. Tag helpers provide extra server-side attributes for HTML elements, making the elements more robust.

    There are four tag helpers you should know for this project: PartialLabelInput, and Validation Summary Message.

    Partial Tag Helper

    CSHTML

    <partial name="_ValidationScriptsPartial" />
    

    This injects the contents of the _ValidationScriptsPartial.cshtml file into a page. The _ValidationScriptsPartial.cshtml file contains JavaScript that’s used to validate form input, so it needs to be included on every page that contains a form.

    Label tag helper

    CSHTML

    <label asp-for="Foo.Id" class="control-label"></label>
    

    This extends the standard HTML <label> element. Like many tag helpers, it uses an asp-for attribute. The attribute accepts a property from the PageModel. In this case, the name of the PageModel‘s Foo.Id property (specifically, the string "Id") will be rendered as the content for an HTML <label> element.

    Input tag helper

    CSHTML

    <input asp-for="Foo.Id" class="form-control" />
    

    Similar to the previous example, this extends the standard HTML <input> element. It also uses an asp-for attribute to specify a PageModel property. In this case, the value of the Foo.Id property will be rendered as the value attribute for an HTML <input> element.

    Validation Summary Tag Helper

    CSHTML

    <div asp-validation-summary="All"></div>
    

    The Validation Summary Tag Helper displays a validation message for a single property on the model.

     Note

    Things like validation rules and property display names are defined in the PageModel class. We’ll point out where to find them in the code in the next unit.

    ibm informix training courses malaysia

    Page handlers

    The PageModel class defines page handlers for HTTP requests and data used to render the page. In the previous exercise, the PizzaListModel class handled the HTTP GET request by setting the value of the PizzaList property to the value of _service.GetPizzas().

    Common handlers include OnGet for page initialization and OnPost for form submissions. To handle an HTTP POST, a page handler might verify the user-submitted data, present the input form page again if invalid, or send the valid data to a service or database for persistence.

    In the next unit, you’ll add a form to create new pizzas using several tag helpers. You’ll also add page handlers to handle the form submission and deletion of pizzas.

    ibm cognos bi training courses malaysia

  • Applying Order Price Unit in Inventory Management

    Order Unit and Order Price Unit

    In a purchase order, you can specify a purchase order price unit (OPUn) and an order unit (OUn) that are different from each other. The purchase order price unit is valid in connection with the net price and is used as the basis for valuating the goods receipt and for invoice verification. You need to enter the delivered quantity in both units of measure (OUn and OPUn) when the goods are received.

    oracle peoplesoft training courses malaysia

    For example, you order 10 frozen geese at a price of EUR 5/kg. In the purchase order, you assume that one goose has an average weight of 4 kg (order value 40 kg * EUR 5). During the goods receipt, you determine that 10 geese weigh a total of 45 kg. For the valuation of the goods receipt and the invoice verification, there is an amount of 45 kg * EUR 5 for the 10 geese.

    oracle linux administration training courses malaysia

  • Summary

    In this module, you learned how to use Blazor components to handle UI events including how to set up two-way data bindings between UI elements and your code. You used what you learned to create a to-do list.

    oracle peoplesoft training courses malaysia

    Learn more

    • Blazor homepage
    • Blazor docs
    • Razor syntax reference
    • Blazor render modes

    oracle linux administration training courses malaysia

  • Razor components

    Now that you have your development environment set up, let’s explore the structure of a Blazor project and learn how Blazor components work.

    jboss enterprise application platform training courses malaysia

    The Home page

    The app’s home page is defined by the Home.razor file located inside the Components/Pages directory. Home.razor contains the following code:

    razor

    @page "/"
    
    <PageTitle>Home</PageTitle>
    
    <h1>Hello, world!</h1>
    
    Welcome to your new app.
    

    The @page directive at the top specifies the route for this page, so that the Home component is displayed when the user navigates to the root of the app. The PageTitle tag is a Blazor component that sets the title for the current page so that it shows up in the browser tab. The rest of the file is normal HTML that defines the content for the page.

    oracle java training courses malaysia

    What is Razor?

    Razor is a markup syntax based on HTML and C#. A Razor file (.razor) contains plain HTML and then C# to define any rendering logic, like for conditionals, control flow, and expression evaluation. Razor files are then compiled into C# classes that encapsulate the component’s rendering logic.

    java programming training courses malaysia

    What are Razor components?

    If you explore the files in the Blazor project, you notice that most of the files that make up the project are .razor files. In Blazor, a Razor file defines a reusable component that makes up a portion of the app UI. Components define what HTML to render and how to handle user events.

    dynamics 365 marketing training courses malaysia

    At compile time, each Razor component is built into a C# class. The class can include common UI elements like state, rendering logic, lifecycle methods, and event handlers. Because Blazor components authored in Razor are just C# classes, you can use arbitrary .NET code from your components.

    java ee enterprise edition training courses malaysia

    Using components

    To use a component from another component, you add an HTML-style tag with a name that matches the component name. For example, if you have a component named MyButton.razor, you can add a MyButton component to another component by adding a <MyButton /> tag.

    itil certification training courses malaysia

    Component parameters

    Components can also have parameters, which allow you to pass data to the component when it’s used. Component parameters are defined by adding a public C# property to the component that also has a [Parameter] attribute. You can then specify a value for a component parameter using an HTML-style attribute that matches the property name. The value of the parameter can be any C# expression.

    istqb software testing certification training courses malaysia

    The @code block

    The @code block in a Razor file is used to add C# class members (fields, properties, and methods) to a component. You can use the @code to keep track of component state, add component parameters, implement component lifecycle events, and define event handlers.

    iso iec 20000 certification training courses malaysia

    Try the Counter

    In the running app, navigate to the Counter page by selecting the Counter tab in the sidebar on the left. The following page should then be displayed:

    Screenshot of the Counter in the running app.

    Select the Click me button to increment the count without a page refresh. Incrementing a counter in a webpage normally requires writing JavaScript, but with Blazor, you can use C#.

    isaca certification training courses malaysia

    You can find the implementation of the Counter component at Components/Pages/Counter.razor.

    razor

    @page "/counter"
    @rendermode InteractiveServer
    
    <PageTitle>Counter</PageTitle>
    
    <h1>Counter</h1>
    
    <p role="status">Current count: @currentCount</p>
    
    <button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
    
    @code {
        private int currentCount = 0;
    
        private void IncrementCount()
        {
            currentCount++;
        }
    }
    

    A request for /counter in the browser, as specified by the @page directive at the top, causes the Counter component to render its content. The @rendermode directive enables interactive server rendering for the component, so that it can handle user interface events from the browser.

    dell emc training courses malaysia

    Each time you select the Click me button:

    • The onclick event is fired.
    • The IncrementCount method is called.
    • The currentCount is incremented.
    • The component is rendered to show the updated count.

    comptia training courses malaysia

  • CRUD actions in ASP.NET Core

    Our pizza service supports CRUD operations for a list of pizzas. These operations are performed through HTTP verbs, which are mapped via ASP.NET Core attributes. As you saw, the HTTP GET verb is used to retrieve one or more items from a service. Such an action is annotated with the [HttpGet] attribute.

    itil training courses malaysia

    The following table shows the mapping of the four operations that you’re implementing for the pizza service:

    HTTP action verbCRUD operationASP.NET Core attribute
    GETRead[HttpGet]
    POSTCreate[HttpPost]
    PUTUpdate[HttpPut]
    DELETEDelete[HttpDelete]

    You already saw how GET actions work. Let’s learn more about POSTPUT, and DELETE actions.

    devops training courses malaysia

    POST

    To enable users to add a new item to the endpoint, you must implement the POST action by using the [HttpPost] attribute. When you pass the item (in this example, a pizza) into the method as a parameter, ASP.NET Core automatically converts any application/JSON sent to the endpoint into a populated .NET Pizza object.

    iot internet of things training courses malaysia

    Here’s the method signature of the Create method that you’ll implement in the next section:

    C#

    [HttpPost]
    public IActionResult Create(Pizza pizza)
    {            
        // This code will save the pizza and return a result
    }
    

    The [HttpPost] attribute maps HTTP POST requests sent to http://localhost:5000/pizza by using the Create() method. Instead of returning a list of pizzas, as we saw with the Get() method, this method returns an IActionResult response.

    ibm websphere training courses malaysia

    IActionResult lets the client know if the request succeeded and provides the ID of the newly created pizza. IActionResult uses standard HTTP status codes, so it can easily integrate with clients regardless of the language or platform they’re running on.

    ASP.NET Core
    action result
    HTTP status codeDescription
    CreatedAtAction201The pizza was added to the in-memory cache.
    The pizza is included in the response body in the media type, as defined in the accept HTTP request header (JSON by default).
    BadRequest is implied400The request body’s pizza object is invalid.

    Fortunately, ControllerBase has utility methods that create the appropriate HTTP response codes and messages for you. You’ll see how those methods work in the next exercise.

    ibm lotus notes domino datastage training courses malaysia

    PUT

    Modifying or updating a pizza in our inventory is similar to the POST method that you implemented, but it uses the [HttpPut] attribute and takes in the id parameter in addition to the Pizza object that needs to be updated:

    C#

    [HttpPut("{id}")]
    public IActionResult Update(int id, Pizza pizza)
    {
        // This code will update the pizza and return a result
    }
    

    Each ActionResult instance used in the preceding action is mapped to the corresponding HTTP status code in the following table:

    ASP.NET Core
    action result
    HTTP status codeDescription
    NoContent204The pizza was updated in the in-memory cache.
    BadRequest400The request body’s Id value doesn’t match the route’s id value.
    BadRequest is implied400The request body’s Pizza object is invalid.

    vmware certification training courses malaysia

    DELETE

    One of the easier actions to implement is the DELETE action, which takes in just the id parameter of the pizza to remove from the in-memory cache:

    C#

    [HttpDelete("{id}")]
    public IActionResult Delete(int id)
    {
        // This code will delete the pizza and return a result
    }
    

    Each ActionResult instance used in the preceding action is mapped to the corresponding HTTP status code in the following table:

    ASP.NET Core
    action result
    HTTP status codeDescription
    NoContent204The pizza was deleted from the in-memory cache.
    NotFound404A pizza that matches the provided id parameter doesn’t exist in the in-memory cache.

    The exercise in the next unit demonstrates how to support each of the four actions in the web API.

    visual studio net training courses malaysia

  • Defining Inventory Management and Physical Inventory

    Inventory Management Environment

    With in-house production (that is internal procurement), the components are made available for production by inventory management and the goods receipt is posted for the end product.

    ibm infosphere datastage training courses malaysia

    On the other hand, material is not only withdrawn from the warehouse for internal production, but also for the delivery of sales orders. When the system generates the delivery, it marks the quantity to be delivered as delivery to customer and deducts it from the total stock when the goods issue (GI) is posted.

    ibm informix training courses malaysia

    The Tasks of Inventory Management

    Managing Material Stock on a Quantity and Value Basis

    Managing Stocks by Quantity

    Inventory management maps the physical stock in real time by recording all stock-changing transactions and the resulting stock updates. An overview of the current stock situation of a material is always available. For example, you can differentiate between the following:

    • Stock quantities in unrestricted-use stock
    • Stock quantities in quality inspection
    • Stock quantities already ordered but not yet received
    • Stock quantities that are in the warehouse, but that are already reserved by the system for production or for a customer

    ibm cognos bi training courses malaysia

    The storage location is the organizational level on which the material’s stocks are managed by quantity. Exceptions are some special stocks that are only managed at plant level (for example, customer consignment stock).

    ibm aix system i training courses malaysia

    If a material is to be subdivided further into lots, a batch can be created for each lot, which is then managed individually in the stock. Inventory management can also manage many of its own and external special stock forms, such as consignment stocks, separately from the normal stock.

    hadoop training courses malaysia

    Managing Stocks By Value

    Stocks are managed not only on a quantity but also on a value basis. With each goods movement, the system automatically updates the following data:

    • Stock quantities and stock values for inventory management
    • G/L accounts for financial accounting by means of automatic account determination
    • Account assignments for cost accounting (provided the internal accounting is active)

    The valuation area is the organizational level at which a material’s stock value is managed.

    exchange server certification training courses malaysia

    Planning, Entry, and Documentation of Goods Movements

    In general, a transaction that causes a stock change is marked as a goods movement. When you post a goods movement, documents are created that form the basis for the quantity and value updates and are also used in the verification process for the movement.

    dynamics 365 training courses malaysia

    We distinguish between goods receipts, goods issues, stock transfers, and transfer postings:

    • Goods receipt (GR):A goods receipt is a goods movement that is posted with the goods received from external vendors as well as production. A goods receipt leads to an increase in warehouse stock.
    • Goods Issue (GI):A goods issue is a goods movement in which a material withdrawal, material consumption, or goods shipment is posted to a customer. A goods issue leads to a decrease in warehouse stock.
    • Stock transfer:A stock transfer is a goods movement in which materials are removed from a particular storage location and placed into another storage location. Stock transfers can take place both within the same plant and between two plants.
    • Transfer posting:A transfer posting is a superordinate term for stock transfers and changes the stock identification or qualification of a material, regardless of whether the posting is linked to a physical movement. Examples of transfer postings include the release of the stock for quality inspection, the transfer posting from material to material, and the transfer of consignment material to own stock.

    dynamics 365 supply chain training courses malaysia

    Documents for Goods Movements

    Material document

    The material document serves as verification for the goods movement and as a source of information for all subsequent applications. The material document consists of a header and at least one item. The header contains general data about the movement type, such as the date and delivery note number. The items describe the individual goods movements.

    dynamics 365 finance training courses malaysia

    A material document is identified by the document number and the material document year.

    dynamics 365 sales training courses malaysia

    Accounting document

    If the movement is relevant for financial accounting, or in other words If the movement leads to an update of the G/L accounts, the system creates an accounting document parallel to the material document. Using automatic account determination, the system updates the G/L accounts that are affected by a goods movement.

    dynamics 365 field service training courses malaysia

    An accounting document is identified by the company code, the document number, and the fiscal year.

    dynamics 365 customer service training courses malaysia

    As well as the creation of the documents mentioned previously, the entry of a goods movement triggers other transactions in the system. For example, the stock quantities and values are updated in the material master record. The system also updates any other applications involved in the transaction.

    devops certification training courses malaysia

    Carrying Out the Physical Inventory

    With physical inventory, you carry out a physical stock-taking in your warehouse. You compare the actual physical material stock with the data stored in the system. By writing-off the determined inventory differences, you update the accounting inventory data according to the results of the physical inventory. You can carry out physical inventory for both your own stock and external stock.

    contact

  • Introduction

    This module explores creating a cross-platform RESTful service by using ASP.NET Core web API controllers with .NET and C#.

    For local development, we use the .NET CLI (command-line interface) and Visual Studio Code. After you complete this module, you can apply its concepts by using a development environment like Visual Studio (Windows). You can also apply the concepts to continued development through Visual Studio Code (Windows, Linux, and macOS).

    ibm infosphere datastage training courses malaysia

    Example scenario

    Suppose you’re an employee of a pizza company named Contoso Pizza. Your manager asks you to develop a RESTful service for pizza inventory management as a prerequisite for the company’s web storefront and mobile application. The service has to support adding, viewing, modifying, and removing types of pizza; a standardized usage of HTTP verbs better known as create, read, update, delete (CRUD).

    ibm informix training courses malaysia

    What are we doing?

    In this module, you create a new web API application by using ASP.NET Core, and learn how to run and test it from the command line. Then, you add a data store and a new API controller. Finally, you implement and test the API methods to create, read, update, and delete pizzas from the data store.

    ibm cognos bi training courses malaysia

    What’s the main goal?

    By the end of this session, you’re able to create new web API applications by using ASP.NET Core, and you learn how to create API controllers that implement basic CRUD logic.

    ibm aix system i-training courses malaysia

  • Introduction to tools for declarative agents in Copilot Studio

    Explore how to create and configure tools in Copilot Studio to expand the capabilities of your declarative agents. Connect your declarative agent to external data sources and customize generative responses.

    Learning objectives

    By the end of this module, you’re able to:

    • Describe tools in Copilot Studio.
    • Identify the types of tools that can extend a declarative agent in Copilot Studio.
    • Describe scenarios for adding tools to an agent.
    • Describe technical considerations for configuring tools in Copilot Studio.

    web development

  • Integrate Office and Dynamics 365 Customer Engagement apps

    Work with templates and Office products to expand the capability of Dynamics 365 Customer Engagement apps.

    Learning objectives

    In this module, you will:

    • Explore template options and security.
    • Examine how Office products integrate with Dynamics 365.

    testing

  • Explore migration options for SAP on Azure

    This module explores strategies for migration of SAP workloads to Azure, including migration of on-premises SAP workloads to Azure in conjunction to performing an upgrade.

    Learning objectives

    After completing this module, you will be able to:

    • Analyze strategies for migrating SAP systems to Microsoft Azure.
    • Compare classical migration options.
    • Explore downtime-optimized migration.

    supply chain