Skip to content

Admin View Add Category

Aditya Abeysinghe edited this page Jun 13, 2020 · 5 revisions

Table of Contents

  1. Basic Overview
  2. Data processing architecture
  3. Features
  4. Demos

Basic Overview

This page serves the admin to add a category to the system. Additionally, on page load all categories and their counts are displayed. The admin has the ability to edit and delete a category given their correct login credentials. Additionally, the admin also has the ability to view subcategories for a specific category.

Data Processing Overview

The data processing workflow for this page is shown in the image below:

Data Processing Workflow

As shown in the image, on page load a service reference to the Category web service in the ServiceApplication project is made. With this reference the Admin view can pass data from and to databases. On page load a list of categories and their key details are loaded in a filter and pagination view. Then the user has the option for editing and deleting a specific category. As in load on click event of these buttons (Edit and Delete) the service reference is called which in turn calls stored procedures with required parameters to update the view.

There are two databases used in this page. The BuyGrandAdminRR (or Read Replica) database is used for only reading data and the other database BuyGrandAdmin is used for all other operations such as inserting, updating and deleting data.

Features

  1. Add category - As per the database architecture of both Admin databases each category is linked to one or more subcategories. Therefore, to add a category a subcategory must be added.
  2. View category details - On page load the following content for each category is loaded in a table. Additionally, pagination is enabled with filters starting from 25 items per page.
    • Category Name
    • Number of subcategories
    • Number of items for that category
    • Buttons to edit and delete that category and to view list of subcategories for that category
  3. Edit category - Given the new category name, login username and login password a category name could be edited
  4. Delete category - Given the login username and login password a category could be deleted
  5. View subcategories - Subcategories for a category could be viewed as a list loaded using AJAX requests to a middle .NET script which in turn retrieves data using the Category web service.

Demos