diff --git a/CustomAdaptor/Components/EmployeeData.cs b/CustomAdaptor/Components/EmployeeData.cs deleted file mode 100644 index 1174d49..0000000 --- a/CustomAdaptor/Components/EmployeeData.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace CustomAdaptor.Components.Pages -{ - public class EmployeeData - { - public static List Employees = new List(); - - public EmployeeData() { } - - public EmployeeData(int EmployeeID, string FirstName, string LastName, string Title, string Country) - { - this.EmployeeID = EmployeeID; - this.FirstName = FirstName; - this.LastName = LastName; - this.Title = Title; - this.Country = Country; - } - - public static List GetAllRecords() - { - if (Employees.Count == 0) - { - var firstNames = new string[] { "Alice", "John", "Claire", "Michael", "Sophia", "William", "Emma", "James", "Olivia", "Ethan" }; - var lastNames = new string[] { "Smith", "Doe", "Johnson", "Brown", "Davis", "Wilson", "Martinez", "Anderson", "Taylor", "Thomas" }; - var titles = new string[] { "Sales Representative", "Vice President, Sales", "Sales Manager", "Inside Sales Coordinator" }; - var countries = new string[] { "USA", "UK", "UAE", "NED", "BER" }; - - Random random = new Random(); - for (int i = 1; i <= 100; i++) - { - Employees.Add(new EmployeeData( - i, - firstNames[random.Next(firstNames.Length)], - lastNames[random.Next(lastNames.Length)], - titles[random.Next(titles.Length)], - countries[random.Next(countries.Length)] - )); - } - } - return Employees; - } - public int EmployeeID { get; set; } - public string? FirstName { get; set; } - public string? LastName { get; set; } - public string? Title { get; set; } - public string? Country { get; set; } - } -} diff --git a/CustomAdaptor/Components/Pages/Counter.razor b/CustomAdaptor/Components/Pages/Counter.razor deleted file mode 100644 index ef23cb3..0000000 --- a/CustomAdaptor/Components/Pages/Counter.razor +++ /dev/null @@ -1,18 +0,0 @@ -@page "/counter" - -Counter - -

Counter

- -

Current count: @currentCount

- - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } -} diff --git a/CustomAdaptor/Components/Pages/Home.razor b/CustomAdaptor/Components/Pages/Home.razor deleted file mode 100644 index 5d268f0..0000000 --- a/CustomAdaptor/Components/Pages/Home.razor +++ /dev/null @@ -1,106 +0,0 @@ -@page "/" - -@using Syncfusion.Blazor.Grids -@using Syncfusion.Blazor.DropDowns -@using Syncfusion.Blazor.Data -@using Syncfusion.Blazor.Calendars - - - - - - - - - - - - - - -@code { - private SfGrid Grid; - public List Orders { get; set; } - - protected override void OnInitialized() - { - Orders = OrderData.GetAllRecords(); - } - - public class CustomAdaptor : DataAdaptor - { - public override object Read(DataManagerRequest dm, string key = null) - { - IEnumerable DataSource = OrderData.GetAllRecords(); - - if (dm.Search != null && dm.Search.Count > 0) - DataSource = DataOperations.PerformSearching(DataSource, dm.Search); - - if (dm.Sorted != null && dm.Sorted.Count > 0) - DataSource = DataOperations.PerformSorting(DataSource, dm.Sorted); - - if (dm.Where != null && dm.Where.Count > 0) - DataSource = DataOperations.PerformFiltering(DataSource, dm.Where, dm.Where[0].Operator); - - int count = DataSource.Cast().Count(); - - if (dm.Skip != 0) - DataSource = DataOperations.PerformSkip(DataSource, dm.Skip); - - if (dm.Take != 0) - DataSource = DataOperations.PerformTake(DataSource, dm.Take); - - return dm.RequiresCounts - ? new DataResult() { Result = DataSource, Count = count } - : (object)DataSource; - } - - public override object Insert(DataManager dataManager, object record, string additionalParam) - { - if(record == null){ - return "no record"; - - } - // Check if the record is null before inserting - if (record is OrderData orderData) - { - OrderData.GetAllRecords().Insert(0, orderData); - } - return record; - } - public override object Update(DataManager dataManager, object updateRecord, string primaryColumnName, string additionalParam) - { - if (updateRecord is OrderData updatedOrder) - { - // Retrieve the existing order based on the primary key - var existingOrder = OrderData.GetAllRecords() - .FirstOrDefault(order => order.OrderID == updatedOrder.OrderID); - - if (existingOrder != null) - { - // Update properties if they are not null or default - existingOrder.CustomerID = updatedOrder.CustomerID; - existingOrder.EmployeeID = updatedOrder.EmployeeID; - existingOrder.ShipCountry = updatedOrder.ShipCountry; - existingOrder.Freight = updatedOrder.Freight; - existingOrder.Verified = updatedOrder.Verified; - } - } - - // Call the base method to complete the update process - return (updateRecord); - - } - public override object Remove(DataManager dataManager, object primaryColumnValue, string primaryColumnName, string additionalParam) - { - int orderId = int.Parse(primaryColumnValue.ToString()); - var data = OrderData.GetAllRecords().FirstOrDefault(orderData => orderData.OrderID == orderId); - if (data != null) - { - // Remove the record from the data collection - OrderData.GetAllRecords().Remove(data); - } - return (primaryColumnValue); - } - } -} diff --git a/CustomAdaptor/Components/Pages/OrderData.cs b/CustomAdaptor/Components/Pages/OrderData.cs deleted file mode 100644 index fb50272..0000000 --- a/CustomAdaptor/Components/Pages/OrderData.cs +++ /dev/null @@ -1,134 +0,0 @@ -namespace CustomAdaptor.Components.Pages -{ - public enum OrderStatus - { - Processing, - Shipped, - Delivered, - Cancelled - } - - // Complex Type for Customer Details - public class CustomerDetails - { - public CustomerDetails() { } // Parameterless constructor for OData compatibility - - public CustomerDetails(string name, string email) - { - Name = name; - Email = email; - } - public string? Name { get; set; } - - public string? Email { get; set; } - } - - public class OrderData - { - public static List Orders = new List(); - - public OrderData() - { - } - - public OrderData( - int orderID, string customerID, int employeeID, double freight, bool verified, - DateOnly orderDate, TimeOnly orderedTime, string shipCity, string shipName, string shipCountry, - DateTime shippedDate, string shipAddress, OrderStatus status, CustomerDetails customerDetails) - { - OrderID = orderID; - CustomerID = customerID; - EmployeeID = employeeID; - Freight = freight; - Verified = verified; - OrderDate = orderDate; - OrderedTime = orderedTime; - ShipCity = shipCity; - ShipName = shipName; - ShipCountry = shipCountry; - ShippedDate = shippedDate; - ShipAddress = shipAddress; - Status = status; - CustomerDetails = customerDetails; - } - - public static List GetAllRecords() - { - if (Orders.Count == 0) - { - int code = 10000; - int employeecode = 1; - for (int i = 1; i <= 100; i++) - { - Orders.Add(new OrderData(code + 1, "ALFKI", employeecode++, 2.3 * (i % 10 + 1), false, - new DateOnly(1991, 05, 15), new TimeOnly(10, i % 60, 0), "Berlin", "Simons Bistro", "Denmark", - new DateTime(1991, 05, 16, 10, i % 60, 0), "Kirchgasse 6", OrderStatus.Processing, - new CustomerDetails("John Doe", "johndoe@example.com"))); - - Orders.Add(new OrderData(code + 2, "ANATR", employeecode++, 3.3 * (i % 10 + 2), true, - new DateOnly(1990, 04, 04), new TimeOnly(11, i % 60, 0), "Madrid", "Queen Cozinha", "Brazil", - new DateTime(1990, 04, 05, 11, i % 60, 0), "Avda. Azteca 123", OrderStatus.Shipped, - new CustomerDetails("Jane Smith", "janesmith@example.com"))); - - Orders.Add(new OrderData(code + 3, "ANTON", employeecode++, 4.3 * (i % 10 + 3), true, - new DateOnly(1957, 11, 30), new TimeOnly(12, i % 60, 0), "Cholchester", "Frankenversand", "Germany", - new DateTime(1957, 12, 01, 12, i % 60, 0), "Carrera 52 con Ave. Bolívar #65-98 Llano Largo", OrderStatus.Delivered, - new CustomerDetails("Alice Johnson", "alicej@example.com"))); - - Orders.Add(new OrderData(code + 4, "BLONP", employeecode++, 5.3 * (i % 10 + 4), false, - new DateOnly(1930, 10, 22), new TimeOnly(13, i % 60, 0), "Marseille", "Ernst Handel", "Austria", - new DateTime(1930, 10, 23, 13, i % 60, 0), "Magazinweg 7", OrderStatus.Cancelled, - new CustomerDetails("Bob Brown", "bobbrown@example.com"))); - - Orders.Add(new OrderData(code + 5, "BERGS", employeecode++, 6.3 * (i % 10 + 5), true, - new DateOnly(2000, 12, 10), new TimeOnly(14, i % 60, 0), "London", "Victoria's Deli", "United Kingdom", - new DateTime(2000, 12, 11, 14, i % 60, 0), "221B Baker Street", OrderStatus.Processing, - new CustomerDetails("Charlie Green", "charliegreen@example.com"))); - - Orders.Add(new OrderData(code + 6, "CHOPS", employeecode++, 7.3 * (i % 10 + 6), false, - new DateOnly(2015, 06, 20), new TimeOnly(15, i % 60, 0), "Sydney", "Harbor Delight", "Australia", - new DateTime(2015, 06, 21, 15, i % 60, 0), "Opera House St.", OrderStatus.Shipped, - new CustomerDetails("Diana Prince", "dianap@example.com"))); - - Orders.Add(new OrderData(code + 7, "DUMON", employeecode++, 8.3 * (i % 10 + 7), true, - new DateOnly(2010, 03, 15), new TimeOnly(16, i % 60, 0), "Toronto", "Maple Leaf Bistro", "Canada", - new DateTime(2010, 03, 16, 16, i % 60, 0), "Maple Street 10", OrderStatus.Delivered, - new CustomerDetails("Edward Norton", "edwardn@example.com"))); - - Orders.Add(new OrderData(code + 8, "FOLKO", employeecode++, 9.3 * (i % 10 + 8), false, - new DateOnly(2020, 01, 05), new TimeOnly(17, i % 60, 0), "Paris", "Eiffel Café", "France", - new DateTime(2020, 01, 06, 17, i % 60, 0), "Louvre Lane", OrderStatus.Cancelled, - new CustomerDetails("Fiona Scott", "fiona.scott@example.com"))); - - Orders.Add(new OrderData(code + 9, "GODOS", employeecode++, 10.3 * (i % 10 + 9), true, - new DateOnly(2005, 07, 12), new TimeOnly(18, i % 60, 0), "Rome", "Colosseum Cuisine", "Italy", - new DateTime(2005, 07, 13, 18, i % 60, 0), "Via Roma 20", OrderStatus.Shipped, - new CustomerDetails("George Clooney", "georgec@example.com"))); - - Orders.Add(new OrderData(code + 10, "HUNGO", employeecode++, 11.3 * (i % 10 + 10), false, - new DateOnly(1985, 09, 18), new TimeOnly(19, i % 60, 0), "New York", "Statue Grill", "USA", - new DateTime(1985, 09, 19, 19, i % 60, 0), "Liberty Street", OrderStatus.Processing, - new CustomerDetails("Harvey Specter", "harveys@example.com"))); - - code += 10; - } - } - return Orders; - } - - public int? OrderID { get; set; } - public string? CustomerID { get; set; } - public int? EmployeeID { get; set; } - public double? Freight { get; set; } - public string? ShipCity { get; set; } - public bool? Verified { get; set; } - public DateOnly OrderDate { get; set; } - public TimeOnly OrderedTime { get; set; } // Represents the order time - public string? ShipName { get; set; } - public string? ShipCountry { get; set; } - public DateTime ShippedDate { get; set; } // Represents the shipped date and time - public string? ShipAddress { get; set; } - public OrderStatus Status { get; set; } // Enum column - public CustomerDetails? CustomerDetails { get; set; } // Complex column - } -} diff --git a/CustomAdaptor/CustomAdaptor.sln b/CustomAdaptor/CustomAdaptor.sln deleted file mode 100644 index f00e40d..0000000 --- a/CustomAdaptor/CustomAdaptor.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35527.113 d17.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomAdaptor", "CustomAdaptor.csproj", "{1B3E2630-538D-4F35-8E56-6449D343786F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1B3E2630-538D-4F35-8E56-6449D343786F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B3E2630-538D-4F35-8E56-6449D343786F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B3E2630-538D-4F35-8E56-6449D343786F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B3E2630-538D-4F35-8E56-6449D343786F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/CustomAdaptor/CustomAdaptor.slnx b/CustomAdaptor/CustomAdaptor.slnx new file mode 100644 index 0000000..260c932 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor.slnx @@ -0,0 +1,3 @@ + + + diff --git a/CustomAdaptor/Components/App.razor b/CustomAdaptor/CustomAdaptor/Components/App.razor similarity index 87% rename from CustomAdaptor/Components/App.razor rename to CustomAdaptor/CustomAdaptor/Components/App.razor index 5cf71f7..113cffa 100644 --- a/CustomAdaptor/Components/App.razor +++ b/CustomAdaptor/CustomAdaptor/Components/App.razor @@ -5,20 +5,21 @@ + - - - + + - + + diff --git a/CustomAdaptor/Components/Layout/MainLayout.razor b/CustomAdaptor/CustomAdaptor/Components/Layout/MainLayout.razor similarity index 100% rename from CustomAdaptor/Components/Layout/MainLayout.razor rename to CustomAdaptor/CustomAdaptor/Components/Layout/MainLayout.razor diff --git a/CustomAdaptor/Components/Layout/MainLayout.razor.css b/CustomAdaptor/CustomAdaptor/Components/Layout/MainLayout.razor.css similarity index 100% rename from CustomAdaptor/Components/Layout/MainLayout.razor.css rename to CustomAdaptor/CustomAdaptor/Components/Layout/MainLayout.razor.css diff --git a/CustomAdaptor/Components/Layout/NavMenu.razor b/CustomAdaptor/CustomAdaptor/Components/Layout/NavMenu.razor similarity index 100% rename from CustomAdaptor/Components/Layout/NavMenu.razor rename to CustomAdaptor/CustomAdaptor/Components/Layout/NavMenu.razor diff --git a/CustomAdaptor/Components/Layout/NavMenu.razor.css b/CustomAdaptor/CustomAdaptor/Components/Layout/NavMenu.razor.css similarity index 100% rename from CustomAdaptor/Components/Layout/NavMenu.razor.css rename to CustomAdaptor/CustomAdaptor/Components/Layout/NavMenu.razor.css diff --git a/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor new file mode 100644 index 0000000..e740b0c --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor @@ -0,0 +1,31 @@ + + + +
+ +

+ Rejoining the server... +

+

+ Rejoin failed... trying again in seconds. +

+

+ Failed to rejoin.
Please retry or reload the page. +

+ +

+ The session has been paused by the server. +

+

+ Failed to resume the session.
Please retry or reload the page. +

+ +
+
diff --git a/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.css b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.css new file mode 100644 index 0000000..3ad3773 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.css @@ -0,0 +1,157 @@ +.components-reconnect-first-attempt-visible, +.components-reconnect-repeated-attempt-visible, +.components-reconnect-failed-visible, +.components-pause-visible, +.components-resume-failed-visible, +.components-rejoining-animation { + display: none; +} + +#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible, +#components-reconnect-modal.components-reconnect-show .components-rejoining-animation, +#components-reconnect-modal.components-reconnect-paused .components-pause-visible, +#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible, +#components-reconnect-modal.components-reconnect-retrying, +#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible, +#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation, +#components-reconnect-modal.components-reconnect-failed, +#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible { + display: block; +} + + +#components-reconnect-modal { + background-color: white; + width: 20rem; + margin: 20vh auto; + padding: 2rem; + border: 0; + border-radius: 0.5rem; + box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3); + opacity: 0; + transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete; + animation: components-reconnect-modal-fadeOutOpacity 0.5s both; + &[open] + +{ + animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s; + animation-fill-mode: both; +} + +} + +#components-reconnect-modal::backdrop { + background-color: rgba(0, 0, 0, 0.4); + animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out; + opacity: 1; +} + +@keyframes components-reconnect-modal-slideUp { + 0% { + transform: translateY(30px) scale(0.95); + } + + 100% { + transform: translateY(0); + } +} + +@keyframes components-reconnect-modal-fadeInOpacity { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes components-reconnect-modal-fadeOutOpacity { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.components-reconnect-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; +} + +#components-reconnect-modal p { + margin: 0; + text-align: center; +} + +#components-reconnect-modal button { + border: 0; + background-color: #6b9ed2; + color: white; + padding: 4px 24px; + border-radius: 4px; +} + + #components-reconnect-modal button:hover { + background-color: #3b6ea2; + } + + #components-reconnect-modal button:active { + background-color: #6b9ed2; + } + +.components-rejoining-animation { + position: relative; + width: 80px; + height: 80px; +} + + .components-rejoining-animation div { + position: absolute; + border: 3px solid #0087ff; + opacity: 1; + border-radius: 50%; + animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite; + } + + .components-rejoining-animation div:nth-child(2) { + animation-delay: -0.5s; + } + +@keyframes components-rejoining-animation { + 0% { + top: 40px; + left: 40px; + width: 0; + height: 0; + opacity: 0; + } + + 4.9% { + top: 40px; + left: 40px; + width: 0; + height: 0; + opacity: 0; + } + + 5% { + top: 40px; + left: 40px; + width: 0; + height: 0; + opacity: 1; + } + + 100% { + top: 0px; + left: 0px; + width: 80px; + height: 80px; + opacity: 0; + } +} diff --git a/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.js b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.js new file mode 100644 index 0000000..a44de78 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Layout/ReconnectModal.razor.js @@ -0,0 +1,63 @@ +// Set up event handlers +const reconnectModal = document.getElementById("components-reconnect-modal"); +reconnectModal.addEventListener("components-reconnect-state-changed", handleReconnectStateChanged); + +const retryButton = document.getElementById("components-reconnect-button"); +retryButton.addEventListener("click", retry); + +const resumeButton = document.getElementById("components-resume-button"); +resumeButton.addEventListener("click", resume); + +function handleReconnectStateChanged(event) { + if (event.detail.state === "show") { + reconnectModal.showModal(); + } else if (event.detail.state === "hide") { + reconnectModal.close(); + } else if (event.detail.state === "failed") { + document.addEventListener("visibilitychange", retryWhenDocumentBecomesVisible); + } else if (event.detail.state === "rejected") { + location.reload(); + } +} + +async function retry() { + document.removeEventListener("visibilitychange", retryWhenDocumentBecomesVisible); + + try { + // Reconnect will asynchronously return: + // - true to mean success + // - false to mean we reached the server, but it rejected the connection (e.g., unknown circuit ID) + // - exception to mean we didn't reach the server (this can be sync or async) + const successful = await Blazor.reconnect(); + if (!successful) { + // We have been able to reach the server, but the circuit is no longer available. + // We'll reload the page so the user can continue using the app as quickly as possible. + const resumeSuccessful = await Blazor.resumeCircuit(); + if (!resumeSuccessful) { + location.reload(); + } else { + reconnectModal.close(); + } + } + } catch (err) { + // We got an exception, server is currently unavailable + document.addEventListener("visibilitychange", retryWhenDocumentBecomesVisible); + } +} + +async function resume() { + try { + const successful = await Blazor.resumeCircuit(); + if (!successful) { + location.reload(); + } + } catch { + reconnectModal.classList.replace("components-reconnect-paused", "components-reconnect-resume-failed"); + } +} + +async function retryWhenDocumentBecomesVisible() { + if (document.visibilityState === "visible") { + await retry(); + } +} diff --git a/CustomAdaptor/CustomAdaptor/Components/Pages/Counter.razor b/CustomAdaptor/CustomAdaptor/Components/Pages/Counter.razor new file mode 100644 index 0000000..c326802 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Pages/Counter.razor @@ -0,0 +1,145 @@ +@page "/counter" + +

How to pass additional parameters to custom adaptor

+ + + + + + + + + + + + + + + + +@code { + // Custom parameter to be included with each DataManager request + public Query GridQuery = new Query().AddParams("CustomerIDFilter", "ALFKI"); + /// + /// Custom adaptor for the Syncfusion Blazor DataGrid that operates on an + /// in‑memory collection and supports request‑driven data processing. + /// + public sealed class CustomAdaptor : DataAdaptor + { + /// + /// Retrieves records and applies the operations described by the . + /// Executes during initial grid load and whenever filtering, searching, sorting, + /// paging, grouping, or other data operations are triggered. + /// + /// + /// Describes the requested data operations from the DataGrid. + /// + /// + /// Optional correlation key; not used. + /// + /// + /// Returns a when counts are required; otherwise returns the collection. + /// + public override async Task ReadAsync(DataManagerRequest dataManagerRequest, string? key = null) + { + try + { + IEnumerable dataSource = OrderDetails.GetAllRecords(); + + // Access custom parameter (CustomerIDFilter) and apply an optional pre-filter + if (dataManagerRequest.Params != null && + dataManagerRequest.Params.TryGetValue("CustomerIDFilter", out var value) && + !string.IsNullOrWhiteSpace(value?.ToString())) + { + string customerId = value.ToString()!; + dataSource = dataSource.Where(o => o.CustomerId == customerId); + } + + // ----------------- + // Searching + // ----------------- + if (dataManagerRequest.Search is { Count: > 0 }) + { + dataSource = DataOperations.PerformSearching( + dataSource, + dataManagerRequest.Search); + } + + // ----------------- + // Filtering + // ----------------- + if (dataManagerRequest.Where is { Count: > 0 }) + { + dataSource = DataOperations.PerformFiltering( + dataSource, + dataManagerRequest.Where, + dataManagerRequest.Where[0].Operator); + } + // ----------------- + // Sorting + // ----------------- + if (dataManagerRequest.Sorted is { Count: > 0 }) + { + dataSource = DataOperations.PerformSorting( + dataSource, + dataManagerRequest.Sorted); + } + + // Compute the total number of records. + int totalRecordsCount = dataSource.Count(); + + // ----------------- + // Paging (Skip/Take) + // ----------------- + if (dataManagerRequest.Skip > 0) + { + dataSource = DataOperations.PerformSkip(dataSource, dataManagerRequest.Skip); + } + + if (dataManagerRequest.Take > 0) + { + dataSource = DataOperations.PerformTake(dataSource, dataManagerRequest.Take); + } + + // When RequiresCounts = true, return DataResult; otherwise return the collection. + return dataManagerRequest.RequiresCounts + ? new DataResult + { + Result = dataSource, + Count = totalRecordsCount + } + : (object)dataSource; + } + catch (Exception ex) + { + throw new InvalidOperationException( + $"Data retrieval failed in CustomAdaptor: {ex.Message}", ex); + } + } + } +} diff --git a/CustomAdaptor/Components/Pages/Error.razor b/CustomAdaptor/CustomAdaptor/Components/Pages/Error.razor similarity index 100% rename from CustomAdaptor/Components/Pages/Error.razor rename to CustomAdaptor/CustomAdaptor/Components/Pages/Error.razor diff --git a/CustomAdaptor/CustomAdaptor/Components/Pages/Home.razor b/CustomAdaptor/CustomAdaptor/Components/Pages/Home.razor new file mode 100644 index 0000000..c19790c --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Pages/Home.razor @@ -0,0 +1,433 @@ +@page "/" + +

CustomAdaptor

+ +@using System.Collections + + + + + + + + + + + @{ + var aggregate = (context as AggregateTemplateContext); +
Sum: @aggregate?.Sum
+ } +
+
+
+
+ + + + + @{ + var aggregate = (context as AggregateTemplateContext); +
Average: @aggregate?.Average
+ } +
+
+
+
+
+ + + + + + + + +
+@code { + /// + /// Custom adaptor for the Syncfusion Blazor DataGrid that operates on an + /// in‑memory collection and supports request‑driven data processing. + /// + public sealed class CustomAdaptor : DataAdaptor + { + /// + /// Retrieves records and applies the operations described by the . + /// Executes during initial grid load and whenever filtering, searching, sorting, + /// paging, grouping, or other data operations are triggered. + /// + /// + /// Describes the requested data operations from the DataGrid. + /// + /// + /// Optional correlation key; not used. + /// + /// + /// Returns a when counts are required; otherwise returns the collection. + /// + public override async Task ReadAsync(DataManagerRequest dataManagerRequest, string? key = null) + { + try + { + // Retrieve the in‑memory data collection. + IEnumerable dataSource = OrderDetails.GetAllRecords(); + + // ----------------- + // Searching + // ----------------- + if (dataManagerRequest.Search is { Count: > 0 }) + { + dataSource = DataOperations.PerformSearching( + dataSource, + dataManagerRequest.Search); + } + + // ----------------- + // Filtering + // ----------------- + if (dataManagerRequest.Where is { Count: > 0 }) + { + dataSource = DataOperations.PerformFiltering( + dataSource, + dataManagerRequest.Where, + dataManagerRequest.Where[0].Operator); + } + // ----------------- + // Sorting + // ----------------- + if (dataManagerRequest.Sorted is { Count: > 0 }) + { + dataSource = DataOperations.PerformSorting( + dataSource, + dataManagerRequest.Sorted); + } + + // Compute the total number of records. + int totalRecordsCount = dataSource.Count(); + + // ----------------- + // Paging (Skip/Take) + // ----------------- + if (dataManagerRequest.Skip > 0) + { + dataSource = DataOperations.PerformSkip(dataSource, dataManagerRequest.Skip); + } + + if (dataManagerRequest.Take > 0) + { + dataSource = DataOperations.PerformTake(dataSource, dataManagerRequest.Take); + } + + // ----------------------- + // Grouping (+ optional aggregates) + // ----------------------- + // When grouping is present, return a hierarchical structure and include count/aggregates envelope. + if (dataManagerRequest.Group is { Count: > 0 }) + { + // Build the grouped hierarchy from the current data set. + IEnumerable grouped = dataSource.ToList(); + // Build hierarchical structure for each group descriptor in request order. + foreach (var group in dataManagerRequest.Group) + { + grouped = DataUtil.Group( + grouped, + group, + dataManagerRequest.Aggregates, // pass descriptors if present + 0, + dataManagerRequest.GroupByFormatter); + } + + // Build DataResult with optional aggregates + return new DataResult + { + Result = grouped, + Count = totalRecordsCount, + Aggregates = dataManagerRequest.Aggregates is { Count: > 0 } + ? DataUtil.PerformAggregation(dataSource, dataManagerRequest.Aggregates) + : null + }; + } + + + // ----------------------- + // Aggregates (no grouping) + // ----------------------- + if (dataManagerRequest.Aggregates is { Count: > 0 }) + { + return new DataResult + { + Result = dataSource, + Count = totalRecordsCount, + Aggregates = DataUtil.PerformAggregation(dataSource, dataManagerRequest.Aggregates) + }; + } + + // When RequiresCounts = true, return DataResult; otherwise return the collection. + return dataManagerRequest.RequiresCounts + ? new DataResult + { + Result = dataSource, + Count = totalRecordsCount + } + : (object)dataSource; + } + catch (Exception ex) + { + throw new InvalidOperationException( + $"Data retrieval failed in CustomAdaptor: {ex.Message}", ex); + } + } + + /// + /// Inserts a record into the in-memory collection and returns the inserted entity. + /// + /// DataManager context. + /// Entity to insert. + /// Primary key field name (for example, "OrderId"). + /// The inserted entity. + public override async Task InsertAsync(DataManager dataManager, object value, string key) + { + if (value is null) + throw new ArgumentNullException(nameof(value)); + + // Strongly type the inbound payload; fail fast if the cast is invalid + if (value is not OrderDetails entity) + throw new ArgumentException("Invalid payload type for OrderDetails insert.", nameof(value)); + + // Resolve the in-memory store + List store = OrderDetails.GetAllRecords(); + + // Generate a key when not provided (0 is treated as 'unassigned') + if (entity.OrderId <= 0) + { + int nextId = store.Count == 0 ? 1000 : store.Max(o => o.OrderId) + 1; + entity.OrderId = nextId; + } + + // Insert at the beginning to surface newly added records + store.Insert(0, entity); + + // Return as Task to satisfy the InsertAsync contract + return await Task.FromResult(entity); + } + + /// + /// Updates a record in the in-memory collection and returns the updated entity. + /// + /// DataManager context. + /// Entity with updated values. + /// Primary key field name (for example, "OrderId"). + /// Primary key value (not used when the entity carries the key). + /// The updated entity. + public override Task UpdateAsync(DataManager dataManager, object value, string keyField, string key) + { + if (value is null) + throw new ArgumentNullException(nameof(value)); + + if (value is not OrderDetails updated) + throw new ArgumentException("Invalid payload type for OrderDetails update.", nameof(value)); + + // Resolve the in-memory store + List store = OrderDetails.GetAllRecords(); + + // Validate key (OrderId must be a positive integer) + if (updated.OrderId <= 0) + throw new ArgumentOutOfRangeException(nameof(updated.OrderId), "OrderId must be a positive integer."); + + // Locate existing record + OrderDetails? existing = store.FirstOrDefault(o => o.OrderId == updated.OrderId); + if (existing is null) + throw new InvalidOperationException($"Order with id {updated.OrderId} was not found."); + + // Apply field updates + existing.CustomerId = updated.CustomerId; + existing.ShipCity = updated.ShipCity; + existing.ShipCountry = updated.ShipCountry; + existing.Freight = updated.Freight; + existing.OrderDate = updated.OrderDate; + + // Return the updated entity (Task result to satisfy async contract) + return Task.FromResult(existing); + } + + /// + /// Removes a record from the in-memory collection and returns the removed entity or key. + /// + /// DataManager context. + /// Primary key value or entity instance. + /// Primary key field name (for example, "OrderId"). + /// Primary key value as string. + /// The removed entity when found; otherwise the provided key/value. + public override Task RemoveAsync(DataManager dataManager, object data, string keyField, string key) + { + // Resolve the in-memory store + List store = OrderDetails.GetAllRecords(); + + // 1) Prefer the explicit 'key' parameter when provided (e.g., "1012") + if (!string.IsNullOrWhiteSpace(key) && int.TryParse(key, out int idFromKey) && idFromKey > 0) + { + var existing = store.FirstOrDefault(o => o.OrderId == idFromKey); + if (existing is not null) + { + store.Remove(existing); + return Task.FromResult(existing); + } + // Not found: return the attempted key for transparency + return Task.FromResult(idFromKey); + } + + // 2) Handle integer payload (data passed as primitive id) + if (data is int idFromInt && idFromInt > 0) + { + var existing = store.FirstOrDefault(o => o.OrderId == idFromInt); + if (existing is not null) + { + store.Remove(existing); + return Task.FromResult(existing); + } + return Task.FromResult(idFromInt); + } + + // 3) Handle entity payload (data passed as OrderDetails) + if (data is OrderDetails entity && entity.OrderId > 0) + { + var existing = store.FirstOrDefault(o => o.OrderId == entity.OrderId); + if (existing is not null) + { + store.Remove(existing); + return Task.FromResult(existing); + } + return Task.FromResult(entity.OrderId); + } + + // 4) Fallback: attempt to parse any string/boxed payload into an id + if (int.TryParse(data?.ToString(), out int idFromString) && idFromString > 0) + { + var existing = store.FirstOrDefault(o => o.OrderId == idFromString); + if (existing is not null) + { + store.Remove(existing); + return Task.FromResult(existing); + } + return Task.FromResult(idFromString); + } + + // 5) Final fallback (no valid identifier available) + // Return the most informative value available (key, data, or empty string) + return Task.FromResult((object)(key ?? data ?? string.Empty)); + } + + /// + /// Applies batch add, update, and delete operations to the in-memory collection + /// and returns the updated source. + /// + /// DataManager context. + /// Modified records. + /// Newly added records. + /// Deleted records. + /// Primary key field name (for example, "OrderId"). + /// Primary key value (not used in batch processing). + /// Optional index used for drag-and-drop scenarios. + /// The updated data source. + public override Task BatchUpdateAsync( + DataManager dataManager, + object changedRecords, + object addedRecords, + object deletedRecords, + string keyField, + string key, + int? dropIndex) + { + List store = OrderDetails.GetAllRecords(); + + // ------- Updates ------- + if (changedRecords is IEnumerable changed) + { + foreach (var item in changed) + { + if (item is null || item.OrderId <= 0) continue; + + var existing = store.FirstOrDefault(o => o.OrderId == item.OrderId); + if (existing is not null) + { + existing.CustomerId = item.CustomerId; + existing.ShipCity = item.ShipCity; + existing.ShipCountry = item.ShipCountry; + existing.Freight = item.Freight; + existing.OrderDate = item.OrderDate; + } + } + } + + // ------- Inserts ------- + if (addedRecords is IEnumerable added) + { + foreach (var item in added) + { + if (item is null) continue; + + if (item.OrderId <= 0) + { + int nextId = store.Count == 0 ? 1000 : store.Max(o => o.OrderId) + 1; + item.OrderId = nextId; + } + + // Prevent duplicate keys + if (!store.Any(o => o.OrderId == item.OrderId)) + { + store.Add(item); + } + } + } + + // ------- Deletes ------- + if (deletedRecords is IEnumerable deleted) + { + foreach (var item in deleted) + { + if (item is null || item.OrderId <= 0) continue; + + var existing = store.FirstOrDefault(o => o.OrderId == item.OrderId); + if (existing is not null) + { + store.Remove(existing); + } + } + } + + //Return the updated entity + return Task.FromResult(store); + } + } +} \ No newline at end of file diff --git a/CustomAdaptor/CustomAdaptor/Components/Pages/NotFound.razor b/CustomAdaptor/CustomAdaptor/Components/Pages/NotFound.razor new file mode 100644 index 0000000..917ada1 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Components/Pages/NotFound.razor @@ -0,0 +1,5 @@ +@page "/not-found" +@layout MainLayout + +

Not Found

+

Sorry, the content you are looking for does not exist.

\ No newline at end of file diff --git a/CustomAdaptor/Components/Pages/Weather.razor b/CustomAdaptor/CustomAdaptor/Components/Pages/Weather.razor similarity index 95% rename from CustomAdaptor/Components/Pages/Weather.razor rename to CustomAdaptor/CustomAdaptor/Components/Pages/Weather.razor index dd36b18..2a2a6cf 100644 --- a/CustomAdaptor/Components/Pages/Weather.razor +++ b/CustomAdaptor/CustomAdaptor/Components/Pages/Weather.razor @@ -17,7 +17,7 @@ else Date Temp. (C) - Temp. (F) + Temp. (F) Summary diff --git a/CustomAdaptor/Components/Routes.razor b/CustomAdaptor/CustomAdaptor/Components/Routes.razor similarity index 69% rename from CustomAdaptor/Components/Routes.razor rename to CustomAdaptor/CustomAdaptor/Components/Routes.razor index f756e19..105855d 100644 --- a/CustomAdaptor/Components/Routes.razor +++ b/CustomAdaptor/CustomAdaptor/Components/Routes.razor @@ -1,4 +1,4 @@ - + diff --git a/CustomAdaptor/Components/_Imports.razor b/CustomAdaptor/CustomAdaptor/Components/_Imports.razor similarity index 82% rename from CustomAdaptor/Components/_Imports.razor rename to CustomAdaptor/CustomAdaptor/Components/_Imports.razor index 3c142df..923ffe7 100644 --- a/CustomAdaptor/Components/_Imports.razor +++ b/CustomAdaptor/CustomAdaptor/Components/_Imports.razor @@ -8,6 +8,8 @@ @using Microsoft.JSInterop @using CustomAdaptor @using CustomAdaptor.Components +@using CustomAdaptor.Components.Layout @using Syncfusion.Blazor @using Syncfusion.Blazor.Grids -@using Syncfusion.Blazor.Data \ No newline at end of file +@using Syncfusion.Blazor.Data +@using CustomAdaptor.Models; \ No newline at end of file diff --git a/CustomAdaptor/CustomAdaptor.csproj b/CustomAdaptor/CustomAdaptor/CustomAdaptor.csproj similarity index 66% rename from CustomAdaptor/CustomAdaptor.csproj rename to CustomAdaptor/CustomAdaptor/CustomAdaptor.csproj index 22c39a3..ae5f7fd 100644 --- a/CustomAdaptor/CustomAdaptor.csproj +++ b/CustomAdaptor/CustomAdaptor/CustomAdaptor.csproj @@ -1,14 +1,15 @@ - net9.0 + net10.0 enable enable + true - - + + diff --git a/CustomAdaptor/CustomAdaptor.csproj.user b/CustomAdaptor/CustomAdaptor/CustomAdaptor.csproj.user similarity index 100% rename from CustomAdaptor/CustomAdaptor.csproj.user rename to CustomAdaptor/CustomAdaptor/CustomAdaptor.csproj.user diff --git a/CustomAdaptor/CustomAdaptor/Models/OrderDetails.cs b/CustomAdaptor/CustomAdaptor/Models/OrderDetails.cs new file mode 100644 index 0000000..baedc86 --- /dev/null +++ b/CustomAdaptor/CustomAdaptor/Models/OrderDetails.cs @@ -0,0 +1,105 @@ +namespace CustomAdaptor.Models +{ + /// + /// Represents an order entity used as the data contract for CustomAdaptor-based binding. + /// + public sealed class OrderDetails + { + private static readonly List _orders = new(); + + /// + /// Initializes a new instance of the class. + /// + public OrderDetails() + { + } + + /// + /// Initializes a new instance of the class with values. + /// + /// Order identifier. + /// Customer identifier. + /// Destination city. + /// Destination country. + /// Freight amount. + /// Order creation date. + public OrderDetails( + int orderId, + string customerId, + string shipCity, + string shipCountry, + double freight, + DateTime orderDate) + { + OrderId = orderId; + CustomerId = customerId; + ShipCity = shipCity; + ShipCountry = shipCountry; + Freight = freight; + OrderDate = orderDate; + } + + /// + /// Gets or sets the order identifier. + /// + public int OrderId { get; set; } + + /// + /// Gets or sets the customer identifier. + /// + public string CustomerId { get; set; } = string.Empty; + + /// + /// Gets or sets the destination city. + /// + public string ShipCity { get; set; } = string.Empty; + + /// + /// Gets or sets the destination country. + /// + public string ShipCountry { get; set; } = string.Empty; + + /// + /// Gets or sets the freight amount. + /// + public double Freight { get; set; } + + /// + /// Gets or sets the order creation date. + /// + public DateTime OrderDate { get; set; } + + /// + /// Returns an in-memory collection of orders. + /// + /// A list of instances. + /// + /// The collection is initialized once and reused across requests. + /// + public static List GetAllRecords() + { + if (_orders.Count == 0) + { + Seed(_orders); + } + + return _orders; + } + + private static void Seed(List target) + { + var id = 10000; + + for (var i = 1; i <= 15; i++) + { + target.Add(new OrderDetails(id + 1, "ALFKI", "Berlin", "Germany", 12.5 * i, new DateTime(2025, 01, 05))); + target.Add(new OrderDetails(id + 2, "ANATR", "Madrid", "Spain", 14.0 * i, new DateTime(2025, 02, 04))); + target.Add(new OrderDetails(id + 3, "ANTON", "Rome", "Italy", 16.0 * i, new DateTime(2025, 03, 06))); + target.Add(new OrderDetails(id + 4, "BLONP", "Paris", "France", 18.5 * i, new DateTime(2025, 04, 08))); + target.Add(new OrderDetails(id + 5, "BOLID", "Lisbon", "Portugal", 21.0 * i, new DateTime(2025, 05, 10))); + + id += 5; + } + } + } +} \ No newline at end of file diff --git a/CustomAdaptor/Program.cs b/CustomAdaptor/CustomAdaptor/Program.cs similarity index 82% rename from CustomAdaptor/Program.cs rename to CustomAdaptor/CustomAdaptor/Program.cs index fb61536..741d8a9 100644 --- a/CustomAdaptor/Program.cs +++ b/CustomAdaptor/CustomAdaptor/Program.cs @@ -1,15 +1,11 @@ using CustomAdaptor.Components; using Syncfusion.Blazor; - var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); - builder.Services.AddSyncfusionBlazor(); -Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Ngo9BigBOggjHTQxAR8/V1NMaF5cXmBCfEx3Q3xbf1x1ZFRMZFtbQXFPMyBoS35Rc0ViWHhec3ZcQmZcUkxz"); - var app = builder.Build(); // Configure the HTTP request pipeline. @@ -19,10 +15,9 @@ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } - +app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true); app.UseHttpsRedirection(); - app.UseAntiforgery(); app.MapStaticAssets(); diff --git a/CustomAdaptor/Properties/launchSettings.json b/CustomAdaptor/CustomAdaptor/Properties/launchSettings.json similarity index 81% rename from CustomAdaptor/Properties/launchSettings.json rename to CustomAdaptor/CustomAdaptor/Properties/launchSettings.json index 5667412..1a1dbbf 100644 --- a/CustomAdaptor/Properties/launchSettings.json +++ b/CustomAdaptor/CustomAdaptor/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "http://localhost:5120", + "applicationUrl": "http://localhost:5141", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -14,7 +14,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "https://localhost:7180;http://localhost:5120", + "applicationUrl": "https://localhost:7113;http://localhost:5141", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/CustomAdaptor/appsettings.Development.json b/CustomAdaptor/CustomAdaptor/appsettings.Development.json similarity index 100% rename from CustomAdaptor/appsettings.Development.json rename to CustomAdaptor/CustomAdaptor/appsettings.Development.json diff --git a/CustomAdaptor/appsettings.json b/CustomAdaptor/CustomAdaptor/appsettings.json similarity index 100% rename from CustomAdaptor/appsettings.json rename to CustomAdaptor/CustomAdaptor/appsettings.json diff --git a/CustomAdaptor/wwwroot/app.css b/CustomAdaptor/CustomAdaptor/wwwroot/app.css similarity index 100% rename from CustomAdaptor/wwwroot/app.css rename to CustomAdaptor/CustomAdaptor/wwwroot/app.css diff --git a/CustomAdaptor/wwwroot/favicon.png b/CustomAdaptor/CustomAdaptor/wwwroot/favicon.png similarity index 100% rename from CustomAdaptor/wwwroot/favicon.png rename to CustomAdaptor/CustomAdaptor/wwwroot/favicon.png diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js diff --git a/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map b/CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map similarity index 100% rename from CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map rename to CustomAdaptor/CustomAdaptor/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/1.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/1.png deleted file mode 100644 index 6772011..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/1.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/10.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/10.png deleted file mode 100644 index c038c88..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/10.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/2.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/2.png deleted file mode 100644 index c038c88..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/2.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/3.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/3.png deleted file mode 100644 index 0240362..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/3.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/4.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/4.png deleted file mode 100644 index c2166f1..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/4.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/5.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/5.png deleted file mode 100644 index 5477dec..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/5.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/6.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/6.png deleted file mode 100644 index c86c4e5..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/6.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/7.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/7.png deleted file mode 100644 index dba7673..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/7.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/8.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/8.png deleted file mode 100644 index 861f590..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/8.png and /dev/null differ diff --git a/CustomAdaptor/wwwroot/Scripts/Images/Employees/9.png b/CustomAdaptor/wwwroot/Scripts/Images/Employees/9.png deleted file mode 100644 index 6892ac2..0000000 Binary files a/CustomAdaptor/wwwroot/Scripts/Images/Employees/9.png and /dev/null differ