diff --git a/FruitBank.Common.Server/FruitBank.Common.Server.csproj b/FruitBank.Common.Server/FruitBank.Common.Server.csproj index 2768825..066befd 100644 --- a/FruitBank.Common.Server/FruitBank.Common.Server.csproj +++ b/FruitBank.Common.Server/FruitBank.Common.Server.csproj @@ -37,6 +37,16 @@ C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.8\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll + + diff --git a/FruitBank.Common.Server/FruitBankConst.cs b/FruitBank.Common.Server/FruitBankConst.cs index 231e933..284a463 100644 --- a/FruitBank.Common.Server/FruitBankConst.cs +++ b/FruitBank.Common.Server/FruitBankConst.cs @@ -10,6 +10,7 @@ namespace FruitBank.Common.Server public class FruitBankConst : AcConst { public static string ProjectIdString = "aad53443-2ee2-4650-8a99-97e907265e4e"; + public static string MeasuringRoleSystemName = "Measuring"; static FruitBankConst() { diff --git a/FruitBank.Common/Dtos/CustomerDto.cs b/FruitBank.Common/Dtos/CustomerDto.cs deleted file mode 100644 index 544c17e..0000000 --- a/FruitBank.Common/Dtos/CustomerDto.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace FruitBank.Common.Dtos; - -public class CustomerDto -{ - -} \ No newline at end of file diff --git a/FruitBank.Common/Dtos/ProductDto.cs b/FruitBank.Common/Dtos/ProductDto.cs deleted file mode 100644 index 42f7657..0000000 --- a/FruitBank.Common/Dtos/ProductDto.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace FruitBank.Common.Dtos; - -public class ProductDto -{ - -} \ No newline at end of file diff --git a/FruitBank.Common/Entities/Partner.cs b/FruitBank.Common/Entities/Partner.cs index 377d7ee..699f83b 100644 --- a/FruitBank.Common/Entities/Partner.cs +++ b/FruitBank.Common/Entities/Partner.cs @@ -8,7 +8,6 @@ namespace FruitBank.Common.Entities; [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PartnerDbTableName)] public class Partner : MgEntityBase, IPartner { - public int Id { get; set; } public string Name { get; set; } public string PostalCode { get; set; } public string Country { get; set; } diff --git a/FruitBank.Common/Entities/Shipping.cs b/FruitBank.Common/Entities/Shipping.cs index 5af0c6c..6edf5f5 100644 --- a/FruitBank.Common/Entities/Shipping.cs +++ b/FruitBank.Common/Entities/Shipping.cs @@ -8,10 +8,10 @@ namespace FruitBank.Common.Entities; [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDbTableName)] public class Shipping : MgEntityBase, IShipping { - public int Id { get; set; } public int PartnerId { get; set; } public DateTime ShippingDate { get; set; } public string LicencePlate { get; set; } + public bool IsAllMeasured { get; set; } //[Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(ShippingItem.sh))] //public IEnumerable Shippings { get; set; } diff --git a/FruitBank.Common/Entities/ShippingDocument.cs b/FruitBank.Common/Entities/ShippingDocument.cs index 2863c89..33b7d1e 100644 --- a/FruitBank.Common/Entities/ShippingDocument.cs +++ b/FruitBank.Common/Entities/ShippingDocument.cs @@ -8,7 +8,6 @@ namespace FruitBank.Common.Entities; [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDocumentDbTableName)] public class ShippingDocument : MgEntityBase, IShippingDocument { - public int Id { get; set; } public int PartnerId { get; set; } public int ShippingId { get; set; } public int ShippingItemId { get; set; } diff --git a/FruitBank.Common/Entities/ShippingItem.cs b/FruitBank.Common/Entities/ShippingItem.cs index 8fcf5d5..569ea3d 100644 --- a/FruitBank.Common/Entities/ShippingItem.cs +++ b/FruitBank.Common/Entities/ShippingItem.cs @@ -11,8 +11,7 @@ namespace FruitBank.Common.Entities; [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingItemDbTableName)] public class ShippingItem : MgEntityBase, IShippingItem { - public int Id { get; set; } - + public int ProductId { get; set; } //[Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(Shipping.Id))] //public IEnumerable Shippings { get; set; } @@ -22,6 +21,7 @@ public class ShippingItem : MgEntityBase, IShippingItem public double GrossWeight { get; set; } public double MeasuredNetWeight { get; set; } public double MeasuredGrossWeight { get; set; } + public bool IsMeasured { get; set; } [SkipValuesOnUpdate] public DateTime Created { get; set; } diff --git a/FruitBank.Common/FruitBank.Common.csproj b/FruitBank.Common/FruitBank.Common.csproj index 127d2b8..4d91e90 100644 --- a/FruitBank.Common/FruitBank.Common.csproj +++ b/FruitBank.Common/FruitBank.Common.csproj @@ -37,6 +37,14 @@ ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll + + + + + + diff --git a/FruitBank.Common/Interfaces/IFruitBankDataControllerClient.cs b/FruitBank.Common/Interfaces/IFruitBankDataControllerClient.cs index ab96c09..e139797 100644 --- a/FruitBank.Common/Interfaces/IFruitBankDataControllerClient.cs +++ b/FruitBank.Common/Interfaces/IFruitBankDataControllerClient.cs @@ -1,5 +1,8 @@ -namespace FruitBank.Common.Interfaces; +using Mango.Nop.Core.Models; + +namespace FruitBank.Common.Interfaces; public interface IFruitBankDataControllerClient : IFruitBankDataControllerCommon { + Task LoginMeasuringUser(string customerEmail, string customerPassword); } \ No newline at end of file diff --git a/FruitBank.Common/Interfaces/IFruitBankDataControllerCommon.cs b/FruitBank.Common/Interfaces/IFruitBankDataControllerCommon.cs index 36a8f6a..2598521 100644 --- a/FruitBank.Common/Interfaces/IFruitBankDataControllerCommon.cs +++ b/FruitBank.Common/Interfaces/IFruitBankDataControllerCommon.cs @@ -1,5 +1,7 @@ using FruitBank.Common.Entities; using FruitBank.Common.Models; +using Mango.Nop.Core.Dtos; +using Mango.Nop.Core.Models; namespace FruitBank.Common.Interfaces; @@ -28,4 +30,14 @@ public interface IFruitBankDataControllerCommon public Task?> GetShippingDocuments(); public Task GetShippingDocumentById(int id); #endregion ShippingDocument + + #region Customer + public Task?> GetMeasuringUsers(); + #endregion Customer + + #region Product + public Task?> GetProductDtos(); + #endregion Product + + Task LoginMeasuringUser(MgLoginModelRequest loginModelRequest); } \ No newline at end of file diff --git a/FruitBank.Common/Interfaces/IFruitBankDataControllerServer.cs b/FruitBank.Common/Interfaces/IFruitBankDataControllerServer.cs index 6c3b546..9514559 100644 --- a/FruitBank.Common/Interfaces/IFruitBankDataControllerServer.cs +++ b/FruitBank.Common/Interfaces/IFruitBankDataControllerServer.cs @@ -1,4 +1,6 @@ -namespace FruitBank.Common.Interfaces; +using Mango.Nop.Core.Models; + +namespace FruitBank.Common.Interfaces; public interface IFruitBankDataControllerServer : IFruitBankDataControllerCommon { diff --git a/FruitBank.Common/Interfaces/IShipping.cs b/FruitBank.Common/Interfaces/IShipping.cs index 0aae7ed..a3e5338 100644 --- a/FruitBank.Common/Interfaces/IShipping.cs +++ b/FruitBank.Common/Interfaces/IShipping.cs @@ -8,4 +8,5 @@ public interface IShipping : IEntityInt, ITimeStampInfo int PartnerId { get; set; } DateTime ShippingDate { get; set; } string LicencePlate { get; set; } + bool IsAllMeasured { get; set; } } \ No newline at end of file diff --git a/FruitBank.Common/Interfaces/IShippingItem.cs b/FruitBank.Common/Interfaces/IShippingItem.cs index 6a12f87..658f065 100644 --- a/FruitBank.Common/Interfaces/IShippingItem.cs +++ b/FruitBank.Common/Interfaces/IShippingItem.cs @@ -6,9 +6,13 @@ namespace FruitBank.Common.Interfaces; public interface IShippingItem : IEntityInt, ITimeStampInfo { int ShippingDocumentId { get; set; } + int ProductId { get; set; } + string Name { get; set; } double NetWeight { get; set; } double GrossWeight { get; set; } double MeasuredNetWeight { get; set; } double MeasuredGrossWeight { get; set; } + + bool IsMeasured { get; set; } } \ No newline at end of file diff --git a/FruitBank.Common/SignalRs/SignalRTags.cs b/FruitBank.Common/SignalRs/SignalRTags.cs index 2c7e5b3..0b4c421 100644 --- a/FruitBank.Common/SignalRs/SignalRTags.cs +++ b/FruitBank.Common/SignalRs/SignalRTags.cs @@ -22,6 +22,11 @@ public class SignalRTags : AcSignalRTags public const int GetShippingDocuments = 60; public const int GetShippingDocumentById = 61; + public const int GetMeasuringUsers = 70; + public const int GetCustomerDtoById = 71; + + public const int GetProductDtos = 80; + public const int GetProductDtoById = 81; public const int AuthenticateUser = 160; public const int RefreshToken = 200; diff --git a/FruitBankHybrid.Shared.Tests/FruitBankClientTests.cs b/FruitBankHybrid.Shared.Tests/FruitBankClientTests.cs index 60d9980..26bce30 100644 --- a/FruitBankHybrid.Shared.Tests/FruitBankClientTests.cs +++ b/FruitBankHybrid.Shared.Tests/FruitBankClientTests.cs @@ -1,9 +1,11 @@ -using AyCode.Core.Consts; -using AyCode.Core.Enums; +using AyCode.Core.Enums; +using AyCode.Core.Extensions; using AyCode.Core.Loggers; +using AyCode.Utils.Extensions; using FruitBank.Common.Entities; using FruitBank.Common.Loggers; using FruitBankHybrid.Shared.Services.SignalRs; +using Mango.Nop.Core.Dtos; namespace FruitBankHybrid.Shared.Tests { @@ -16,13 +18,14 @@ namespace FruitBankHybrid.Shared.Tests public void TestInit() { _signalRClient = new FruitBankSignalRClient(new List - { - //new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)), - new SignaRClientLogItemWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)) - }); + { + //new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)), + new SignaRClientLogItemWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)) + }); } #region Partner + [TestMethod] public async Task GetPartnersTest() { @@ -66,6 +69,7 @@ namespace FruitBankHybrid.Shared.Tests #endregion Partner #region Shipping + [TestMethod] public async Task GetShippingsTest() { @@ -83,9 +87,11 @@ namespace FruitBankHybrid.Shared.Tests Assert.IsNotNull(shipping); Assert.IsTrue(shipping.Id == 1); } + #endregion Shipping #region ShippingItem + [TestMethod] public async Task GetShippingItemsTest() { @@ -103,9 +109,11 @@ namespace FruitBankHybrid.Shared.Tests Assert.IsNotNull(shippingItem); Assert.IsTrue(shippingItem.Id == 1); } + #endregion ShippingItem #region ShippingDocument + [TestMethod] public async Task GetShippingDocumentsTest() { @@ -123,6 +131,60 @@ namespace FruitBankHybrid.Shared.Tests Assert.IsNotNull(shippingDocument); Assert.IsTrue(shippingDocument.Id == 1); } + #endregion ShippingDocument + + #region Customer + + [TestMethod] + public async Task GetMeasuringUsersTest() + { + var users = await _signalRClient.GetMeasuringUsers(); + + Assert.IsNotNull(users); + Assert.IsTrue(users.Any()); + Assert.IsTrue(users.All(x => !x.Email.IsNullOrEmpty() && !x.Deleted)); + } + + #endregion Customer + + #region Product + + [TestMethod] + public async Task GetProductDtosTest() + { + var productDto = await _signalRClient.GetProductDtos(); + + Assert.IsNotNull(productDto); + Assert.IsTrue(productDto.Any()); + Assert.IsTrue(productDto.All(x => !x.Name.IsNullOrEmpty() && !x.Deleted)); + } + + #endregion Product + + [TestMethod] + [DataRow("aasd@dsserver.com", "Asdasd123456")] + public async Task LoginMeasuringUserTest_TrueIfHasCustomerDto(string email, string password) + { + var loginModelResponse = await _signalRClient.LoginMeasuringUser(email, password); + + Assert.IsNotNull(loginModelResponse); + Assert.IsNotNull(loginModelResponse.CustomerDto, loginModelResponse.ErrorMessage); + + Assert.IsTrue(loginModelResponse.CustomerDto.Email == email, loginModelResponse.ErrorMessage); + } + + [TestMethod] + [DataRow("adam.g@aycode.com", "123")] + public async Task LoginMeasuringUserTest_TrueIfHasNotCustomerDto(string email, string password) + { + var loginModelResponse = await _signalRClient.LoginMeasuringUser(email, password); + + Assert.IsNotNull(loginModelResponse); + Assert.IsNull(loginModelResponse.CustomerDto); + + Assert.IsFalse(loginModelResponse.ErrorMessage.IsNullOrWhiteSpace()); + Console.WriteLine($"Succes: {loginModelResponse.ErrorMessage}"); + } } } diff --git a/FruitBankHybrid.Shared.Tests/FruitBankHybrid.Shared.Tests.csproj b/FruitBankHybrid.Shared.Tests/FruitBankHybrid.Shared.Tests.csproj index 0156b38..ed30024 100644 --- a/FruitBankHybrid.Shared.Tests/FruitBankHybrid.Shared.Tests.csproj +++ b/FruitBankHybrid.Shared.Tests/FruitBankHybrid.Shared.Tests.csproj @@ -28,6 +28,21 @@ ..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll + + ..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Data.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Services.dll + diff --git a/FruitBankHybrid.Shared/FruitBankHybrid.Shared.csproj b/FruitBankHybrid.Shared/FruitBankHybrid.Shared.csproj index 4956aad..ae1d54a 100644 --- a/FruitBankHybrid.Shared/FruitBankHybrid.Shared.csproj +++ b/FruitBankHybrid.Shared/FruitBankHybrid.Shared.csproj @@ -44,6 +44,24 @@ ..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll + + + ..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll + \ No newline at end of file diff --git a/FruitBankHybrid.Shared/Pages/Chat.razor b/FruitBankHybrid.Shared/Pages/Chat.razor index 5e98d82..35f317d 100644 --- a/FruitBankHybrid.Shared/Pages/Chat.razor +++ b/FruitBankHybrid.Shared/Pages/Chat.razor @@ -1,19 +1,60 @@ @page "/chat" +@using DevExpress.Blazor +@using DevExpress.Blazor.Internal @using FruitBankHybrid.Shared.Services @* @inject ISignalRService SignalR *@ -AI Chat +Measuring - - -Send +@* *@ +@* + + + + + + + @context.DataItem.Username + + + + + + + + Selected item: @SelectedUser?.Username + + + *@ - - @foreach (var m in _messages) - { - @m.User: @m.Text - } - + + + @foreach (var user in Users) + { + @user.Username - @user.Email + } + + + + + + + + Get partner + + + @foreach (var m in _messages) + { + @m.User: @m.Text + } + + @code { } diff --git a/FruitBankHybrid.Shared/Pages/Chat.razor.cs b/FruitBankHybrid.Shared/Pages/Chat.razor.cs index b3d6a09..2211b15 100644 --- a/FruitBankHybrid.Shared/Pages/Chat.razor.cs +++ b/FruitBankHybrid.Shared/Pages/Chat.razor.cs @@ -1,6 +1,7 @@ using AyCode.Core.Helpers; using AyCode.Core.Loggers; using AyCode.Models.Users; +using FruitBank.Common.Entities; using FruitBank.Common.Loggers; using FruitBank.Common.Models; using FruitBankHybrid.Shared.Services.Loggers; @@ -14,6 +15,7 @@ using System.Linq; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; +using Mango.Nop.Core.Dtos; using static System.Net.Mime.MediaTypeNames; using static System.Runtime.InteropServices.JavaScript.JSType; using ILogger = FruitBank.Common.Loggers.ILogger; @@ -27,14 +29,25 @@ namespace FruitBankHybrid.Shared.Pages private ILogger _logger; - private string _userName = "BlazorClient"; + private string _userName = "Partner name"; private string _message; private readonly List<(string User, string Text)> _messages = []; + private List Users { get; set; } = []; + private bool DropDownVisible { get; set; } + private CustomerDto? SelectedUser { get; set; } + protected override async Task OnInitializedAsync() { _logger = new LoggerClient(LogWriters.ToArray()); _logger.Info("OnInitializedAsync"); + + Users.AddRange(await FruitBankSignalRClient.GetMeasuringUsers() ?? []); + + //SelectedUser = Users.FirstOrDefault(); + //DropDownVisible = false; + + await base.OnInitializedAsync(); } private async Task GetPartner() @@ -50,6 +63,7 @@ namespace FruitBankHybrid.Shared.Pages } _messages.Add((_userName, measuringModel?.Name ?? "ERROR")); + //StateHasChanged(); } } } diff --git a/FruitBankHybrid.Shared/Services/SignalRs/FruitBankSignalRClient.cs b/FruitBankHybrid.Shared/Services/SignalRs/FruitBankSignalRClient.cs index 2d7d783..34190eb 100644 --- a/FruitBankHybrid.Shared/Services/SignalRs/FruitBankSignalRClient.cs +++ b/FruitBankHybrid.Shared/Services/SignalRs/FruitBankSignalRClient.cs @@ -8,6 +8,8 @@ using FruitBank.Common.Interfaces; using FruitBank.Common.Models; using FruitBank.Common.SignalRs; using FruitBankHybrid.Shared.Services.Loggers; +using Mango.Nop.Core.Dtos; +using Mango.Nop.Core.Models; namespace FruitBankHybrid.Shared.Services.SignalRs { @@ -35,36 +37,64 @@ namespace FruitBankHybrid.Shared.Services.SignalRs => GetAllAsync>(SignalRTags.GetPartners); #region Partner + public Task GetPartnerById(int id) => GetByIdAsync(SignalRTags.GetPartnerById, id); public Task UpdatePartner(Partner partner) - =>PostDataAsync(SignalRTags.UpdatePartner, partner); - + => PostDataAsync(SignalRTags.UpdatePartner, partner); + #endregion Partner #region Shipping + public Task?> GetShippings() => GetAllAsync>(SignalRTags.GetShippings); public Task GetShippingById(int id) => GetByIdAsync(SignalRTags.GetShippingById, id); + #endregion Shipping #region ShippingItem + public Task?> GetShippingItems() => GetAllAsync>(SignalRTags.GetShippingItems); public Task GetShippingItemById(int id) => GetByIdAsync(SignalRTags.GetShippingItemById, id); + #endregion ShippingItem #region ShippingDocument + public Task?> GetShippingDocuments() => GetAllAsync>(SignalRTags.GetShippingDocuments); public Task GetShippingDocumentById(int id) => GetByIdAsync(SignalRTags.GetShippingDocumentById, id); + #endregion ShippingDocument + + #region Customer + + public Task?> GetMeasuringUsers() + => GetAllAsync>(SignalRTags.GetMeasuringUsers); + + #endregion Customer + + #region Product + + public Task?> GetProductDtos() + => GetAllAsync>(SignalRTags.GetProductDtos); + #endregion Product + + #region Authenticate + public Task LoginMeasuringUser(string customerEmail, string customerPassword) + => LoginMeasuringUser(new MgLoginModelRequest(customerEmail, customerPassword)); + + public Task LoginMeasuringUser(MgLoginModelRequest loginModelRequest) + => PostDataAsync(SignalRTags.AuthenticateUser, loginModelRequest); + #endregion Authenticate } } diff --git a/FruitBankHybrid.Shared/_Imports.razor b/FruitBankHybrid.Shared/_Imports.razor index d88eed9..b7ed0e2 100644 --- a/FruitBankHybrid.Shared/_Imports.razor +++ b/FruitBankHybrid.Shared/_Imports.razor @@ -6,3 +6,4 @@ @using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop +@using DevExpress.Blazor diff --git a/FruitBankHybrid.Web.Client/FruitBankHybrid.Web.Client.csproj b/FruitBankHybrid.Web.Client/FruitBankHybrid.Web.Client.csproj index f2676c4..23bf3b6 100644 --- a/FruitBankHybrid.Web.Client/FruitBankHybrid.Web.Client.csproj +++ b/FruitBankHybrid.Web.Client/FruitBankHybrid.Web.Client.csproj @@ -38,6 +38,21 @@ ..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll + \ No newline at end of file diff --git a/FruitBankHybrid.Web.Client/Program.cs b/FruitBankHybrid.Web.Client/Program.cs index eac2ee8..7902e57 100644 --- a/FruitBankHybrid.Web.Client/Program.cs +++ b/FruitBankHybrid.Web.Client/Program.cs @@ -8,6 +8,8 @@ using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.Services.AddDevExpressBlazor(); + // Add device-specific services used by the FruitBankHybrid.Shared project builder.Services.AddSingleton(); //builder.Services.AddScoped(); diff --git a/FruitBankHybrid.Web.Client/_Imports.razor b/FruitBankHybrid.Web.Client/_Imports.razor index bebfc11..174e376 100644 --- a/FruitBankHybrid.Web.Client/_Imports.razor +++ b/FruitBankHybrid.Web.Client/_Imports.razor @@ -8,3 +8,4 @@ @using Microsoft.JSInterop @using FruitBankHybrid.Shared @using FruitBankHybrid.Web.Client +@using DevExpress.Blazor diff --git a/FruitBankHybrid.Web/Components/App.razor b/FruitBankHybrid.Web/Components/App.razor index 0dc32a8..a426dab 100644 --- a/FruitBankHybrid.Web/Components/App.razor +++ b/FruitBankHybrid.Web/Components/App.razor @@ -1,20 +1,33 @@ - +@using DevExpress.Blazor + + - - - - - - - - + + + + + + + + + @DxResourceManager.RegisterTheme(Themes.Fluent) + @DxResourceManager.RegisterScripts() + + + + + - - + + + +@code { + private string AppendVersion(string path) => $"{path}?v={typeof(DevExpress.Blazor.ResourcesConfigurator).Assembly.GetName().Version}"; +} diff --git a/FruitBankHybrid.Web/Components/_Imports.razor b/FruitBankHybrid.Web/Components/_Imports.razor index edb3a15..c2694c1 100644 --- a/FruitBankHybrid.Web/Components/_Imports.razor +++ b/FruitBankHybrid.Web/Components/_Imports.razor @@ -10,3 +10,4 @@ @using FruitBankHybrid.Web @using FruitBankHybrid.Web.Client @using FruitBankHybrid.Web.Components +@using DevExpress.Blazor diff --git a/FruitBankHybrid.Web/FruitBankHybrid.Web.csproj b/FruitBankHybrid.Web/FruitBankHybrid.Web.csproj index 580d13e..2b234eb 100644 --- a/FruitBankHybrid.Web/FruitBankHybrid.Web.csproj +++ b/FruitBankHybrid.Web/FruitBankHybrid.Web.csproj @@ -53,6 +53,21 @@ ..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll + + + C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll + diff --git a/FruitBankHybrid.Web/Program.cs b/FruitBankHybrid.Web/Program.cs index e233357..2f6162b 100644 --- a/FruitBankHybrid.Web/Program.cs +++ b/FruitBankHybrid.Web/Program.cs @@ -1,3 +1,4 @@ +using DevExpress.Blazor; using AyCode.Core.Loggers; using AyCode.Services.Server.SignalRs; using FruitBank.Common; @@ -14,6 +15,7 @@ var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents(); +builder.Services.AddDevExpressBlazor(); // Add device-specific services used by the FruitBankHybrid.Shared project builder.Services.AddSingleton();
+ Selected item: @SelectedUser?.Username +