From 644485fb63c24c3674021f9b547b177e3f81ba91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=97=D0=B5=D0=BB?= =?UTF-8?q?=D1=82=D1=8B=D0=BD=D1=8C?= Date: Tue, 9 Jun 2026 20:43:42 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=20=D0=B8=D0=B7?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=8F=D1=82=D1=8C=20=D0=B2=D0=B8=D0=B7=D1=83?= =?UTF-8?q?=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=20=D1=84=D0=BE=D1=80=D0=BC=D1=83?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CartriX.Api/db.db | Bin 167936 -> 167936 bytes CartriX.Shared/Classes/ApiRoutes.cs | 7 +- .../Pages/LocationsPage/Dialog/Page1.razor | 91 ++++++++++-------- 3 files changed, 57 insertions(+), 41 deletions(-) diff --git a/CartriX.Api/db.db b/CartriX.Api/db.db index 51314dbb9d0838fc912871fce6f13b1ef2c8a76d..d918644992997db9939d39ddca2bb3a8afcbe4fb 100644 GIT binary patch delta 49 zcmZozz}2vTYl1YR_(U0JM)8daUGf5khE^sp>UhDL^lrj{nnzvSD0$un;MCC|iG F003d44x|78 delta 49 zcmZozz}2vTYl1W*??f4AM&6AHUGf43=2nJ4WT9taU~Xw(VA1?bzWtXx $"api/{nameof(Cartridge)}/{nameof(GetForPrinter)}?{nameof(PrinterId)}={PrinterId}"; public static string Item(int Id) => $"api/{nameof(Cartridge)}/{nameof(Item)}?{nameof(Id)}={Id}"; - public static string GetArticlesList => $"api/{nameof(Cartridge)}/{nameof(GetArticlesList)}"; + public static string GetFamilyModelList => $"api/{nameof(Cartridge)}/{nameof(GetFamilyModelList)}"; public static string AddCartridge => $"api/{nameof(Cartridge)}/{nameof(AddCartridge)}"; public static string List => $"api/{nameof(Cartridge)}/{nameof(List)}"; } @@ -31,11 +31,16 @@ namespace CartriX.Shared.Classes public static string AddPrinter => $"api/{nameof(Printer)}/{nameof(AddPrinter)}"; public static string ListConnectionType => $"api/{nameof(Printer)}/{nameof(ListConnectionType)}"; public static string ListPrintType => $"api/{nameof(Printer)}/{nameof(ListPrintType)}"; + public static string GetAddressOIDs => $"api/{nameof(Printer)}/{nameof(GetAddressOIDs)}"; } public static class Location { public static string List => $"api/{nameof(Location)}/{nameof(List)}"; public static string ListPrinters(int LocationId) => $"api/{nameof(Location)}/{nameof(ListPrinters)}?{nameof(LocationId)}={LocationId}"; } + public static class Manufacturer + { + public static string List => $"api/{nameof(Manufacturer)}/{nameof(List)}"; + } } } \ No newline at end of file diff --git a/CartriX.Web/Pages/LocationsPage/Dialog/Page1.razor b/CartriX.Web/Pages/LocationsPage/Dialog/Page1.razor index 45c945f..20251d9 100644 --- a/CartriX.Web/Pages/LocationsPage/Dialog/Page1.razor +++ b/CartriX.Web/Pages/LocationsPage/Dialog/Page1.razor @@ -1,41 +1,42 @@ @inject HttpClient http - - - - - - - - - + + + + + + + + @if (DataToPrinterAdd.PrinterConnetctionTypeId == 1) { - - - - - - - + + + + + + + + } @if (DataToPrinterAdd.PrinterConnetctionTypeId == 2) { - - - + + } - - - - - - - - - - + + + + + + + + + + + + @code { @@ -44,17 +45,20 @@ private List printerConnectionTypeItems = new(); private List printerPrintTypeItems = new(); - private List articleItems = new(); + private List CartridgeModelItems = new(); + private List OIDAddressItems = new(); + private List ManufacturerItems = new(); private string tempIpAddressOrHostname = default!; protected override async Task OnInitializedAsync() { await GetPrinterConnectionTypeItems(); await GetPrinterPrintTypeItems(); - await GetArticleItems(); + await GetCartridgeModelItems(); + await GetOIDAddressItems(); + await GetManufacturerItems(); await ValidateForm(); } - private bool IsPageValid() { if (DataToPrinterAdd.PrinterConnetctionTypeId == 0 || @@ -86,12 +90,10 @@ return true; } - async Task ValidateForm() { await OnValidationChanged.InvokeAsync(IsPageValid()); } - async Task OnConnetctionTypeChanged(int newValue) { DataToPrinterAdd.PrinterConnetctionTypeId = newValue; @@ -112,25 +114,34 @@ StateHasChanged(); await ValidateForm(); } - async Task GetPrinterConnectionTypeItems() { var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Printer.ListConnectionType); var json = await responce.Content.ReadAsStringAsync(); printerConnectionTypeItems = JsonConvert.DeserializeObject>(json)!; } - async Task GetPrinterPrintTypeItems() { var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Printer.ListPrintType); var json = await responce.Content.ReadAsStringAsync(); printerPrintTypeItems = JsonConvert.DeserializeObject>(json)!; } - - async Task GetArticleItems() + async Task GetCartridgeModelItems() { - var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Cartridge.GetArticlesList); + var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Cartridge.GetFamilyModelList); var json = await responce.Content.ReadAsStringAsync(); - articleItems = JsonConvert.DeserializeObject>(json)!; + CartridgeModelItems = JsonConvert.DeserializeObject>(json)!; + } + async Task GetManufacturerItems() + { + var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Manufacturer.List); + var json = await responce.Content.ReadAsStringAsync(); + ManufacturerItems = JsonConvert.DeserializeObject>(json)!; + } + async Task GetOIDAddressItems() + { + var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Printer.GetAddressOIDs); + var json = await responce.Content.ReadAsStringAsync(); + OIDAddressItems = JsonConvert.DeserializeObject>(json)!; } }