diff --git a/Labaratory/Labaratory/Labaratory.csproj b/Labaratory/Labaratory/Labaratory.csproj index 51cf7ba..afd20ea 100644 --- a/Labaratory/Labaratory/Labaratory.csproj +++ b/Labaratory/Labaratory/Labaratory.csproj @@ -95,76 +95,16 @@ MSBuild:Compile Designer - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - True - True - Model1.Context.tt - - - True - True - Model1.tt - - - True - True - Model1.edmx - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - - - Model1.tt - Designer MSBuild:Compile @@ -232,13 +172,6 @@ ResXFileCodeGenerator Resources.Designer.cs - - EntityModelCodeGenerator - Model1.Designer.cs - - - Model1.edmx - SettingsSingleFileGenerator @@ -253,20 +186,13 @@ - - TextTemplatingFileGenerator - Model1.Context.cs - Model1.edmx - - - TextTemplatingFileGenerator - Model1.edmx - Model1.cs - + + + diff --git a/Labaratory/Labaratory/ViewModels/Laborant.cs b/Labaratory/Labaratory/ViewModels/Laborant.cs index 8c30691..c3ec1a8 100644 --- a/Labaratory/Labaratory/ViewModels/Laborant.cs +++ b/Labaratory/Labaratory/ViewModels/Laborant.cs @@ -24,6 +24,7 @@ namespace Labaratory.ViewModels public Laborant(Models.User user) { CurrentUser = user; + RoleName = CurrentUser.Role1?.RoleName ?? "Роль не назначена"; CalculateNextNumber(); StartTimer(); ProcessOrderCommand = new RelayCommand(execute => ProcessOrder()); @@ -36,9 +37,45 @@ namespace Labaratory.ViewModels private decimal _totalCost; private string nameRole; private DispatcherTimer _timer; - private TimeSpan _timeSpan = TimeSpan.FromMinutes(2.5); + private TimeSpan _timeSpan = TimeSpan.FromHours(2.5); private string _time; + public string RoleName + { + get => nameRole; + set { nameRole = value; OnPropertyChanged(); } + } + public List AllServices => db.Services.ToList(); + public ICommand ProcessOrderCommand { get; } + public Patient SelectedPatient + { + get => _selectedPatient; + set { _selectedPatient = value; OnPropertyChanged(); } + } + public ObservableCollection SelectedServices + { + get; + set; + } = new ObservableCollection(); + + + public decimal TotalCost + { + get => _totalCost; + set { _totalCost = value; OnPropertyChanged(); } + } + + public string BarcodeInput + { + get => _barcodeInput; + set { _barcodeInput = value; OnPropertyChanged(); } + } + + public string SuggestedNumber + { + get => _suggestedNumber; + set { _suggestedNumber = value; OnPropertyChanged(); } + } public string Time { get => _time; @@ -83,42 +120,6 @@ namespace Labaratory.ViewModels } } } - public string RoleName - { - get => nameRole; - set { nameRole = value; OnPropertyChanged(); } - } - public List AllServices => db.Services.ToList(); - public ICommand ProcessOrderCommand { get; } - public Patient SelectedPatient - { - get => _selectedPatient; - set { _selectedPatient = value; OnPropertyChanged(); } - } - public ObservableCollection SelectedServices - { - get; - set; - } = new ObservableCollection(); - - - public decimal TotalCost - { - get => _totalCost; - set { _totalCost = value; OnPropertyChanged(); } - } - - public string BarcodeInput - { - get => _barcodeInput; - set { _barcodeInput = value; OnPropertyChanged(); } - } - - public string SuggestedNumber - { - get => _suggestedNumber; - set { _suggestedNumber = value; OnPropertyChanged(); } - } private void CalculateNextNumber() { var lastId = db.Orders.OrderByDescending(o => o.ID_Order).Select(o => o.ID_Order).FirstOrDefault(); diff --git a/Labaratory/Labaratory/Views/LaborantWindow.xaml b/Labaratory/Labaratory/Views/LaborantWindow.xaml index 6ff2d43..06324ab 100644 --- a/Labaratory/Labaratory/Views/LaborantWindow.xaml +++ b/Labaratory/Labaratory/Views/LaborantWindow.xaml @@ -134,7 +134,7 @@ -