Yeah
This commit is contained in:
@@ -95,6 +95,9 @@
|
|||||||
<Compile Include="Models\Analyzer_Logs.cs">
|
<Compile Include="Models\Analyzer_Logs.cs">
|
||||||
<DependentUpon>Model1.tt</DependentUpon>
|
<DependentUpon>Model1.tt</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Models\LoggnHistory.cs">
|
||||||
|
<DependentUpon>Model1.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Services\Valid.cs" />
|
<Compile Include="Services\Valid.cs" />
|
||||||
<Compile Include="ViewModels\BaseViewModel.cs" />
|
<Compile Include="ViewModels\BaseViewModel.cs" />
|
||||||
<Compile Include="Models\Insurance_Companies.cs">
|
<Compile Include="Models\Insurance_Companies.cs">
|
||||||
|
|||||||
22
Labaratory/Labaratory/Models/LoggnHistory.cs
Normal file
22
Labaratory/Labaratory/Models/LoggnHistory.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Этот код создан по шаблону.
|
||||||
|
//
|
||||||
|
// Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
|
||||||
|
// Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Labaratory.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class LoggnHistory
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
public string Login { get; set; }
|
||||||
|
public Nullable<System.DateTime> AttemptTime { get; set; }
|
||||||
|
public Nullable<bool> IsSuccess { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,5 +39,6 @@ namespace Labaratory.Models
|
|||||||
public virtual DbSet<Service_Statuses> Service_Statuses { get; set; }
|
public virtual DbSet<Service_Statuses> Service_Statuses { get; set; }
|
||||||
public virtual DbSet<Service> Services { get; set; }
|
public virtual DbSet<Service> Services { get; set; }
|
||||||
public virtual DbSet<User> Users { get; set; }
|
public virtual DbSet<User> Users { get; set; }
|
||||||
|
public virtual DbSet<LoggnHistory> LoggnHistories { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
Labaratory/Labaratory/Models/Model1.Designer.cs
generated
2
Labaratory/Labaratory/Models/Model1.Designer.cs
generated
@@ -1,4 +1,4 @@
|
|||||||
// Создание кода T4 для модели "C:\Users\usersql\source\repos\UP01TASK3\Labaratory\Labaratory\Models\Model1.edmx" включено.
|
// Создание кода T4 для модели "C:\Users\usersql\Source\Repos\UP01TASK3\Labaratory\Labaratory\Models\Model1.edmx" включено.
|
||||||
// Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
|
// Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
|
||||||
// на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
|
// на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
|
||||||
// открыта в конструкторе.
|
// открыта в конструкторе.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<edmx:Runtime>
|
<edmx:Runtime>
|
||||||
<!-- SSDL content -->
|
<!-- SSDL content -->
|
||||||
<edmx:StorageModels>
|
<edmx:StorageModels>
|
||||||
<Schema Namespace="Хранилище LaboratoryDBModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
|
<Schema Namespace="Хранилище LaboratoryDBModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
|
||||||
<EntityType Name="Analyzer_Logs">
|
<EntityType Name="Analyzer_Logs">
|
||||||
<Key>
|
<Key>
|
||||||
<PropertyRef Name="ID_Log" />
|
<PropertyRef Name="ID_Log" />
|
||||||
@@ -46,6 +46,17 @@
|
|||||||
<Property Name="Amount" Type="money" />
|
<Property Name="Amount" Type="money" />
|
||||||
<Property Name="IssueDate" Type="date" />
|
<Property Name="IssueDate" Type="date" />
|
||||||
</EntityType>
|
</EntityType>
|
||||||
|
<!--Ошибки, обнаруженные при создании:
|
||||||
|
предупреждение 6002: В таблице или представлении "LaboratoryDB.dbo.LoggnHistory" не определен первичный ключ. Ключ был выведен, а определение таблицы или представления было создано в режиме только для чтения.-->
|
||||||
|
<EntityType Name="LoggnHistory">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="int" Nullable="false" />
|
||||||
|
<Property Name="Login" Type="nvarchar" MaxLength="50" />
|
||||||
|
<Property Name="AttemptTime" Type="datetime" />
|
||||||
|
<Property Name="IsSuccess" Type="bit" />
|
||||||
|
</EntityType>
|
||||||
<EntityType Name="Order_Items">
|
<EntityType Name="Order_Items">
|
||||||
<Key>
|
<Key>
|
||||||
<PropertyRef Name="ID_OrderItem" />
|
<PropertyRef Name="ID_OrderItem" />
|
||||||
@@ -71,6 +82,7 @@
|
|||||||
<Property Name="Patient" Type="int" />
|
<Property Name="Patient" Type="int" />
|
||||||
<Property Name="Status" Type="int" />
|
<Property Name="Status" Type="int" />
|
||||||
<Property Name="TotalExecutionDays" Type="int" />
|
<Property Name="TotalExecutionDays" Type="int" />
|
||||||
|
<Property Name="Barcode" Type="nvarchar" MaxLength="50" />
|
||||||
</EntityType>
|
</EntityType>
|
||||||
<EntityType Name="Patients">
|
<EntityType Name="Patients">
|
||||||
<Key>
|
<Key>
|
||||||
@@ -385,6 +397,14 @@
|
|||||||
<EntitySet Name="Services" EntityType="Self.Services" Schema="dbo" store:Type="Tables" />
|
<EntitySet Name="Services" EntityType="Self.Services" Schema="dbo" store:Type="Tables" />
|
||||||
<EntitySet Name="User_Services" EntityType="Self.User_Services" Schema="dbo" store:Type="Tables" />
|
<EntitySet Name="User_Services" EntityType="Self.User_Services" Schema="dbo" store:Type="Tables" />
|
||||||
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="LoggnHistory" EntityType="Self.LoggnHistory" store:Type="Tables" store:Schema="dbo">
|
||||||
|
<DefiningQuery>SELECT
|
||||||
|
[LoggnHistory].[ID] AS [ID],
|
||||||
|
[LoggnHistory].[Login] AS [Login],
|
||||||
|
[LoggnHistory].[AttemptTime] AS [AttemptTime],
|
||||||
|
[LoggnHistory].[IsSuccess] AS [IsSuccess]
|
||||||
|
FROM [dbo].[LoggnHistory] AS [LoggnHistory]</DefiningQuery>
|
||||||
|
</EntitySet>
|
||||||
<AssociationSet Name="FK__Analyzer___Analy__5629CD9C" Association="Self.FK__Analyzer___Analy__5629CD9C">
|
<AssociationSet Name="FK__Analyzer___Analy__5629CD9C" Association="Self.FK__Analyzer___Analy__5629CD9C">
|
||||||
<End Role="Analyzers" EntitySet="Analyzers" />
|
<End Role="Analyzers" EntitySet="Analyzers" />
|
||||||
<End Role="Analyzer_Logs" EntitySet="Analyzer_Logs" />
|
<End Role="Analyzer_Logs" EntitySet="Analyzer_Logs" />
|
||||||
@@ -458,8 +478,7 @@
|
|||||||
<End Role="Users" EntitySet="Users" />
|
<End Role="Users" EntitySet="Users" />
|
||||||
</AssociationSet>
|
</AssociationSet>
|
||||||
</EntityContainer>
|
</EntityContainer>
|
||||||
</Schema>
|
</Schema></edmx:StorageModels>
|
||||||
</edmx:StorageModels>
|
|
||||||
<!-- CSDL content -->
|
<!-- CSDL content -->
|
||||||
<edmx:ConceptualModels>
|
<edmx:ConceptualModels>
|
||||||
<Schema Namespace="LaboratoryDBModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
<Schema Namespace="LaboratoryDBModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
||||||
@@ -547,6 +566,7 @@
|
|||||||
<NavigationProperty Name="Order_Items" Relationship="Self.FK__Order_Ite__Order__5AEE82B9" FromRole="Orders" ToRole="Order_Items" />
|
<NavigationProperty Name="Order_Items" Relationship="Self.FK__Order_Ite__Order__5AEE82B9" FromRole="Orders" ToRole="Order_Items" />
|
||||||
<NavigationProperty Name="Order_Statuses" Relationship="Self.FK__Orders__Status__5EBF139D" FromRole="Orders" ToRole="Order_Statuses" />
|
<NavigationProperty Name="Order_Statuses" Relationship="Self.FK__Orders__Status__5EBF139D" FromRole="Orders" ToRole="Order_Statuses" />
|
||||||
<NavigationProperty Name="Patient1" Relationship="Self.FK__Orders__Patient__5DCAEF64" FromRole="Orders" ToRole="Patients" />
|
<NavigationProperty Name="Patient1" Relationship="Self.FK__Orders__Patient__5DCAEF64" FromRole="Orders" ToRole="Patients" />
|
||||||
|
<Property Name="Barcode" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||||
</EntityType>
|
</EntityType>
|
||||||
<EntityType Name="Patient">
|
<EntityType Name="Patient">
|
||||||
<Key>
|
<Key>
|
||||||
@@ -916,7 +936,17 @@
|
|||||||
<End Role="Services" EntitySet="Services" />
|
<End Role="Services" EntitySet="Services" />
|
||||||
<End Role="Users" EntitySet="Users" />
|
<End Role="Users" EntitySet="Users" />
|
||||||
</AssociationSet>
|
</AssociationSet>
|
||||||
|
<EntitySet Name="LoggnHistories" EntityType="LaboratoryDBModel.LoggnHistory" />
|
||||||
</EntityContainer>
|
</EntityContainer>
|
||||||
|
<EntityType Name="LoggnHistory">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="Int32" Nullable="false" />
|
||||||
|
<Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||||
|
<Property Name="AttemptTime" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="IsSuccess" Type="Boolean" />
|
||||||
|
</EntityType>
|
||||||
</Schema>
|
</Schema>
|
||||||
</edmx:ConceptualModels>
|
</edmx:ConceptualModels>
|
||||||
<!-- C-S mapping content -->
|
<!-- C-S mapping content -->
|
||||||
@@ -989,6 +1019,7 @@
|
|||||||
<EntitySetMapping Name="Orders">
|
<EntitySetMapping Name="Orders">
|
||||||
<EntityTypeMapping TypeName="LaboratoryDBModel.Order">
|
<EntityTypeMapping TypeName="LaboratoryDBModel.Order">
|
||||||
<MappingFragment StoreEntitySet="Orders">
|
<MappingFragment StoreEntitySet="Orders">
|
||||||
|
<ScalarProperty Name="Barcode" ColumnName="Barcode" />
|
||||||
<ScalarProperty Name="ID_Order" ColumnName="ID_Order" />
|
<ScalarProperty Name="ID_Order" ColumnName="ID_Order" />
|
||||||
<ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
|
<ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
|
||||||
<ScalarProperty Name="Patient" ColumnName="Patient" />
|
<ScalarProperty Name="Patient" ColumnName="Patient" />
|
||||||
@@ -1085,6 +1116,16 @@
|
|||||||
<ScalarProperty Name="ID_User" ColumnName="ID_User" />
|
<ScalarProperty Name="ID_User" ColumnName="ID_User" />
|
||||||
</EndProperty>
|
</EndProperty>
|
||||||
</AssociationSetMapping>
|
</AssociationSetMapping>
|
||||||
|
<EntitySetMapping Name="LoggnHistories">
|
||||||
|
<EntityTypeMapping TypeName="LaboratoryDBModel.LoggnHistory">
|
||||||
|
<MappingFragment StoreEntitySet="LoggnHistory">
|
||||||
|
<ScalarProperty Name="IsSuccess" ColumnName="IsSuccess" />
|
||||||
|
<ScalarProperty Name="AttemptTime" ColumnName="AttemptTime" />
|
||||||
|
<ScalarProperty Name="Login" ColumnName="Login" />
|
||||||
|
<ScalarProperty Name="ID" ColumnName="ID" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
</EntityContainerMapping>
|
</EntityContainerMapping>
|
||||||
</Mapping>
|
</Mapping>
|
||||||
</edmx:Mappings>
|
</edmx:Mappings>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
<AssociationConnector Association="LaboratoryDBModel.FK__Rendered___Labor__628FA481" ManuallyRouted="false" />
|
<AssociationConnector Association="LaboratoryDBModel.FK__Rendered___Labor__628FA481" ManuallyRouted="false" />
|
||||||
<AssociationConnector Association="LaboratoryDBModel.FK__Users__Role__66603565" ManuallyRouted="false" />
|
<AssociationConnector Association="LaboratoryDBModel.FK__Users__Role__66603565" ManuallyRouted="false" />
|
||||||
<AssociationConnector Association="LaboratoryDBModel.User_Services" ManuallyRouted="false" />
|
<AssociationConnector Association="LaboratoryDBModel.User_Services" ManuallyRouted="false" />
|
||||||
|
<EntityTypeShape EntityType="LaboratoryDBModel.LoggnHistory" Width="1.5" PointX="0.75" PointY="0.75" />
|
||||||
</Diagram>
|
</Diagram>
|
||||||
</edmx:Diagrams>
|
</edmx:Diagrams>
|
||||||
</edmx:Designer>
|
</edmx:Designer>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace Labaratory.Models
|
|||||||
public Nullable<int> Patient { get; set; }
|
public Nullable<int> Patient { get; set; }
|
||||||
public Nullable<int> Status { get; set; }
|
public Nullable<int> Status { get; set; }
|
||||||
public Nullable<int> TotalExecutionDays { get; set; }
|
public Nullable<int> TotalExecutionDays { get; set; }
|
||||||
|
public string Barcode { get; set; }
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
public virtual ICollection<Invoice> Invoices { get; set; }
|
public virtual ICollection<Invoice> Invoices { get; set; }
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Windows;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Labaratory.ViewModels
|
namespace Labaratory.ViewModels
|
||||||
@@ -13,6 +14,71 @@ namespace Labaratory.ViewModels
|
|||||||
public Laborant(Models.User user)
|
public Laborant(Models.User user)
|
||||||
{
|
{
|
||||||
CurrentUser = user;
|
CurrentUser = user;
|
||||||
|
CalculateNextNumber();
|
||||||
|
}
|
||||||
|
private string _barcodeInput;
|
||||||
|
private string _suggestedNumber;
|
||||||
|
private Models.LaboratoryDBEntities db = new Models.LaboratoryDBEntities();
|
||||||
|
|
||||||
|
public string BarcodeInput
|
||||||
|
{
|
||||||
|
get => _barcodeInput;
|
||||||
|
set { _barcodeInput = value; OnPropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string SuggestedNumber
|
||||||
|
{
|
||||||
|
get => _suggestedNumber;
|
||||||
|
set { _suggestedNumber = value; OnPropertyChanged(); }
|
||||||
|
}
|
||||||
|
private void CalculateNextNumber()
|
||||||
|
{
|
||||||
|
// Находим последний ID в заказах (кроме архивных, если есть флаг IsArchived)
|
||||||
|
//var lastId = db.Orders.OrderByDescending(o => o.ID).Select(o => o.ID).FirstOrDefault();
|
||||||
|
//SuggestedNumber = (lastId + 1).ToString();
|
||||||
|
BarcodeInput = SuggestedNumber; // Устанавливаем как значение по умолчанию
|
||||||
|
}
|
||||||
|
private string GetNextOrderNumber()
|
||||||
|
{
|
||||||
|
// Находим максимальный ID_Order
|
||||||
|
var lastId = db.Orders.OrderByDescending(o => o.ID_Order).Select(o => o.ID_Order).FirstOrDefault();
|
||||||
|
return (lastId + 1).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Формирование полного штрих-кода по ТЗ
|
||||||
|
private string CreateFullBarcodeString(string orderId)
|
||||||
|
{
|
||||||
|
string datePart = DateTime.Now.ToString("ddMMyyyy");
|
||||||
|
|
||||||
|
// Генерируем 6 случайных цифр
|
||||||
|
Random rnd = new Random();
|
||||||
|
string randomPart = "";
|
||||||
|
for (int i = 0; i < 6; i++) randomPart += rnd.Next(0, 10).ToString();
|
||||||
|
|
||||||
|
// Результат: ID + Дата + 6 цифр
|
||||||
|
return $"{orderId}{datePart}{randomPart}";
|
||||||
|
}
|
||||||
|
public void ProcessOrder()
|
||||||
|
{
|
||||||
|
if (db.Orders.Any(o => o.Barcode == BarcodeInput))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Такой код пробирки уже существует!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Формируем полный код: ID + Дата + 6 случайных символов
|
||||||
|
string fullCode = GenerateFullBarcode(BarcodeInput);
|
||||||
|
|
||||||
|
// Сохраняем в PDF и БД
|
||||||
|
//SaveToPdf(fullCode);
|
||||||
|
//SaveOrderToDb(fullCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GenerateFullBarcode(string orderId)
|
||||||
|
{
|
||||||
|
string datePart = DateTime.Now.ToString("ddMMyyyy");
|
||||||
|
string uniquePart = Guid.NewGuid().ToString("N").Substring(0, 6); // 6 случайных символов
|
||||||
|
return $"{orderId}{datePart}{uniquePart}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,22 @@
|
|||||||
<Window x:Class="Labaratory.Views.AdminWindow"
|
<Window
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Labaratory.Views"
|
xmlns:local="clr-namespace:Labaratory.Views"
|
||||||
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" x:Class="Labaratory.Views.AdminWindow"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="AdminWindow" Height="450" Width="800">
|
Title="AdminWindow" Height="450" Width="800"
|
||||||
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
|
Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<TabControl>
|
||||||
|
<TabItem Header="Orders" Background="Black">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Orders" Background="Black">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -4,9 +4,33 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Labaratory.Views"
|
xmlns:local="clr-namespace:Labaratory.Views"
|
||||||
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Laborant" Height="450" Width="800">
|
Title="Laborant" Height="450" Width="800"
|
||||||
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
|
Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<TabControl>
|
||||||
|
<TabItem Header="Orders" Background="Black">
|
||||||
|
<StackPanel Margin="20">
|
||||||
|
<ui:TextBlock Text="Введите код пробирки:" Margin="0,0,0,5"/>
|
||||||
|
|
||||||
|
<ui:TextBox
|
||||||
|
Text="{Binding BarcodeInput, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
PlaceholderText="{Binding SuggestedNumber}">
|
||||||
|
<ui:TextBox.InputBindings>
|
||||||
|
<KeyBinding Key="Enter" Command="{Binding ProcessOrderCommand}"/>
|
||||||
|
</ui:TextBox.InputBindings>
|
||||||
|
</ui:TextBox>
|
||||||
|
|
||||||
|
<ui:Button Content="Сформировать заказ"
|
||||||
|
Command="{Binding ProcessOrderCommand}"
|
||||||
|
Margin="0,10,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Orders" Background="Black">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace Labaratory.Views
|
|||||||
public Laborant()
|
public Laborant()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
DataContext = new Laborant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user