diff --git a/Labaratory/Labaratory/Images/Admin.png b/Labaratory/Labaratory/Images/Admin.png new file mode 100644 index 0000000..c476114 Binary files /dev/null and b/Labaratory/Labaratory/Images/Admin.png differ diff --git a/Labaratory/Labaratory/Images/Buhalter.jpeg b/Labaratory/Labaratory/Images/Buhalter.jpeg new file mode 100644 index 0000000..2c3e9a5 Binary files /dev/null and b/Labaratory/Labaratory/Images/Buhalter.jpeg differ diff --git a/Labaratory/Labaratory/Images/Laborant.jpeg b/Labaratory/Labaratory/Images/Laborant.jpeg new file mode 100644 index 0000000..e0c105c Binary files /dev/null and b/Labaratory/Labaratory/Images/Laborant.jpeg differ diff --git a/Labaratory/Labaratory/Images/LaborantExplorer.png b/Labaratory/Labaratory/Images/LaborantExplorer.png new file mode 100644 index 0000000..22e3d88 Binary files /dev/null and b/Labaratory/Labaratory/Images/LaborantExplorer.png differ diff --git a/Labaratory/Labaratory/Labaratory.csproj b/Labaratory/Labaratory/Labaratory.csproj index 8e7e902..51cf7ba 100644 --- a/Labaratory/Labaratory/Labaratory.csproj +++ b/Labaratory/Labaratory/Labaratory.csproj @@ -38,6 +38,9 @@ 4 + + ..\packages\BouncyCastle.Cryptography.2.6.2\lib\net461\BouncyCastle.Cryptography.dll + ..\packages\EasyCaptcha.Wpf.0.9.0.3\lib\net45\EasyCaptcha.Wpf.dll @@ -47,6 +50,9 @@ ..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll + + ..\packages\iTextSharp.5.5.13.5\lib\net461\itextsharp.dll + ..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll @@ -98,7 +104,10 @@ Model1.tt + + + Model1.tt @@ -156,6 +165,10 @@ Model1.tt + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -181,6 +194,9 @@ Code + + AddPatientWindow.xaml + AdminWindow.xaml @@ -233,6 +249,10 @@ + + + + TextTemplatingFileGenerator Model1.Context.cs diff --git a/Labaratory/Labaratory/Models/Model1.Designer.cs b/Labaratory/Labaratory/Models/Model1.Designer.cs index 4cfa274..e29ec55 100644 --- a/Labaratory/Labaratory/Models/Model1.Designer.cs +++ b/Labaratory/Labaratory/Models/Model1.Designer.cs @@ -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". Это свойство доступно в окне "Свойства", если модель // открыта в конструкторе. diff --git a/Labaratory/Labaratory/Models/Model1.edmx b/Labaratory/Labaratory/Models/Model1.edmx index 0b22d44..58feb0d 100644 --- a/Labaratory/Labaratory/Models/Model1.edmx +++ b/Labaratory/Labaratory/Models/Model1.edmx @@ -46,13 +46,11 @@ - - + @@ -386,6 +384,7 @@ + @@ -397,14 +396,6 @@ - - SELECT - [LoggnHistory].[ID] AS [ID], - [LoggnHistory].[Login] AS [Login], - [LoggnHistory].[AttemptTime] AS [AttemptTime], - [LoggnHistory].[IsSuccess] AS [IsSuccess] - FROM [dbo].[LoggnHistory] AS [LoggnHistory] - diff --git a/Labaratory/Labaratory/Services/AuthService.cs b/Labaratory/Labaratory/Services/AuthService.cs new file mode 100644 index 0000000..0ef039e --- /dev/null +++ b/Labaratory/Labaratory/Services/AuthService.cs @@ -0,0 +1,26 @@ +using Labaratory.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Labaratory.Services +{ + public static class AuthService + { + public static void LogAttempt(string login, bool isSuccess) + { + using (var db = new Models.LaboratoryDBEntities()) + { + db.LoggnHistories.Add(new Models.LoggnHistory + { + AttemptTime = DateTime.Now, + Login = login, + IsSuccess = isSuccess + }); + db.SaveChanges(); + } + } + } +} diff --git a/Labaratory/Labaratory/Services/StringToImageConverter.cs b/Labaratory/Labaratory/Services/StringToImageConverter.cs new file mode 100644 index 0000000..5bbc254 --- /dev/null +++ b/Labaratory/Labaratory/Services/StringToImageConverter.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media.Imaging; + +namespace Labaratory.Services +{ + public class StringToImageConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + string imageName = value as string; + + if (string.IsNullOrWhiteSpace(imageName)) + return null; + + try + { + return new BitmapImage(new Uri($"pack://application:,,,/Images/{imageName}")); + } + catch + { + return null; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + => throw new NotImplementedException(); + } +} diff --git a/Labaratory/Labaratory/Services/Valid.cs b/Labaratory/Labaratory/Services/Valid.cs index 7edd86a..5f70b1e 100644 --- a/Labaratory/Labaratory/Services/Valid.cs +++ b/Labaratory/Labaratory/Services/Valid.cs @@ -1,4 +1,7 @@ -using System; +using Labaratory.Models; +using Labaratory.ViewModels; +using Labaratory.Views; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -26,5 +29,40 @@ namespace Labaratory.Services if (string.IsNullOrEmpty(input)) return false; return input.Trim().ToUpper() == original.ToUpper(); } + public static void OpenRoleWindow(User user) + { + if (user.Role.Value == 1) + { + var nextWindow = new AdminWindow(); + + var mainVM = new AdminModel(user); + nextWindow.DataContext = mainVM; + nextWindow.Show(); + } + if (user.Role.Value == 2) + { + var nextWindow = new ByhalterWindow(); + + var mainVM = new ByhalterModel(user); + nextWindow.DataContext = mainVM; + nextWindow.Show(); + } + if (user.Role.Value == 3) + { + var nextWindow = new Views.Laborant(); + + var mainVM = new ViewModels.Laborant(user); + nextWindow.DataContext = mainVM; + nextWindow.Show(); + } + if (user.Role.Value == 4) + { + var nextWindow = new Views.LaborantExplorer(); + + var mainVM = new ViewModels.LaborantExplorer(user); + nextWindow.DataContext = mainVM; + nextWindow.Show(); + } + } } } diff --git a/Labaratory/Labaratory/ViewModels/AddPatientViewModel.cs b/Labaratory/Labaratory/ViewModels/AddPatientViewModel.cs new file mode 100644 index 0000000..2332de6 --- /dev/null +++ b/Labaratory/Labaratory/ViewModels/AddPatientViewModel.cs @@ -0,0 +1,102 @@ +using Labaratory.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Threading.Tasks; +using System.Windows.Input; +using Wpf.Ui.Input; + +namespace Labaratory.ViewModels +{ + public class AddPatientViewModel : BaseViewModel + { + private Models.LaboratoryDBEntities db = new Models.LaboratoryDBEntities(); + + public string Surname { get; set; } + public string FirstName { get; set; } + public string Patronymic { get; set; } + public DateTime BirthDate { get; set; } = DateTime.Now.AddYears(-20); + public string PassportSeries { get; set; } + public string PassportNumber { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + public string InsuranceNumber { get; set; } + + public List PolicyTypes => db.Policy_Types.ToList(); + public List Companies => db.Insurance_Companies.ToList(); + + public Models.Policy_Types SelectedPolicyType { get; set; } + public Models.Insurance_Companies SelectedCompany { get; set; } + + public Models.Patient SavedPatient { get; private set; } + public ICommand SaveCommand { get; } + public ICommand CancelCommand { get; } + + public AddPatientViewModel() + { + SaveCommand = new RelayCommand(ExecuteSave); + CancelCommand = new RelayCommand(ExecuteCancel); + } + + private void ExecuteSave(Window window) + { + if (Save()) + { + if (window != null) + { + window.DialogResult = true; + window.Close(); + } + } + } + + private void ExecuteCancel(Window window) + { + if (window != null) + { + window.DialogResult = false; + window.Close(); + } + } + + public bool Save() + { + try + { + if (string.IsNullOrWhiteSpace(Surname) || string.IsNullOrWhiteSpace(FirstName)) + { + MessageBox.Show("Заполните обязательные поля: Фамилия и Имя"); + return false; + } + + var newPatient = new Models.Patient + { + Surname = Surname, + FirstName = FirstName, + Patronymic = Patronymic, + BirthDate = BirthDate, + PassportSeries = PassportSeries, + PassportNumber = PassportNumber, + Phone = Phone, + Email = Email, + InsuranceNumber = InsuranceNumber, + PolicyType = SelectedPolicyType?.ID_PolicyType, + Company = SelectedCompany?.ID_Company + }; + + db.Patients.Add(newPatient); + db.SaveChanges(); + + SavedPatient = newPatient; + return true; + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при сохранении: " + ex.Message); + return false; + } + } + } +} \ No newline at end of file diff --git a/Labaratory/Labaratory/ViewModels/AdminModel.cs b/Labaratory/Labaratory/ViewModels/AdminModel.cs index 7b30107..5035eab 100644 --- a/Labaratory/Labaratory/ViewModels/AdminModel.cs +++ b/Labaratory/Labaratory/ViewModels/AdminModel.cs @@ -7,6 +7,8 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Input; using Wpf.Ui.Input; +using Labaratory.Models; +using System.Collections.ObjectModel; namespace Labaratory.ViewModels { @@ -17,6 +19,40 @@ namespace Labaratory.ViewModels public AdminModel(Models.User user) { CurrentUser = user; + LoadData(); + } + private Models.LaboratoryDBEntities db = new Models.LaboratoryDBEntities(); + private string _filterLogin; + private List _allLogs; + + public string FilterLogin + { + get => _filterLogin; + set { _filterLogin = value; OnPropertyChanged(); ApplyFilter(); } + } + + private ObservableCollection _history; + public ObservableCollection History + { + get => _history; + set { _history = value; OnPropertyChanged(); } + } + public void LoadData() + { + _allLogs = db.LoggnHistories.OrderByDescending(h => h.AttemptTime).ToList(); + History = new ObservableCollection(_allLogs); + } + + private void ApplyFilter() + { + var filtered = _allLogs.AsEnumerable(); + + if (!string.IsNullOrWhiteSpace(FilterLogin)) + { + filtered = filtered.Where(h => h.Login.ToLower().Contains(FilterLogin.ToLower())); + } + + History = new ObservableCollection(filtered); } } } diff --git a/Labaratory/Labaratory/ViewModels/Laborant.cs b/Labaratory/Labaratory/ViewModels/Laborant.cs index 958e060..abf57ca 100644 --- a/Labaratory/Labaratory/ViewModels/Laborant.cs +++ b/Labaratory/Labaratory/ViewModels/Laborant.cs @@ -4,6 +4,14 @@ using System.Linq; using System.Text; using System.Windows; using System.Threading.Tasks; +using iTextSharp.text; +using iTextSharp.text.pdf; +using System.IO; +using Labaratory.Models; +using System.Collections.ObjectModel; +using System.Windows.Input; +using Wpf.Ui.Input; +using Labaratory.Views; namespace Labaratory.ViewModels { @@ -15,10 +23,34 @@ namespace Labaratory.ViewModels { CurrentUser = user; CalculateNextNumber(); + ProcessOrderCommand = new RelayCommand(execute => ProcessOrder()); } private string _barcodeInput; private string _suggestedNumber; private Models.LaboratoryDBEntities db = new Models.LaboratoryDBEntities(); + private Patient _selectedPatient; + private ObservableCollection _selectedServices = new ObservableCollection(); + private decimal _totalCost; + + 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 { @@ -33,30 +65,9 @@ namespace Labaratory.ViewModels } 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}"; + SuggestedNumber = (lastId + 1).ToString(); + BarcodeInput = SuggestedNumber; } public void ProcessOrder() { @@ -66,19 +77,173 @@ namespace Labaratory.ViewModels return; } - // Формируем полный код: ID + Дата + 6 случайных символов string fullCode = GenerateFullBarcode(BarcodeInput); - // Сохраняем в PDF и БД - //SaveToPdf(fullCode); - //SaveOrderToDb(fullCode); + 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 случайных символов + + Random rnd = new Random(); + string uniquePart = ""; + for (int i = 0; i < 6; i++) + uniquePart += rnd.Next(0, 10).ToString(); + return $"{orderId}{datePart}{uniquePart}"; } + private void SaveOrderToDb(string fullBarcode) + { + try + { + var newOrder = new Models.Order + { + Barcode = fullBarcode, + OrderDate = DateTime.Now, + ID_Order = int.Parse(BarcodeInput) + }; + + db.Orders.Add(newOrder); + db.SaveChanges(); + + MessageBox.Show($"Заказ успешно сохранен! Штрих-код: {fullBarcode}"); + + CalculateNextNumber(); + } + catch (Exception ex) + { + MessageBox.Show($"Ошибка при сохранении в БД: {ex.Message}"); + } + } + + private void SaveToPdf(string fullCode) + { + string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), $"Barcode_{fullCode}.pdf"); + const float mmToPt = 72f / 25.4f; + + // Устанавливаем размер страницы чуть больше штрихкода + Document doc = new Document(new Rectangle(120 * mmToPt, 60 * mmToPt)); + + try + { + PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(filePath, FileMode.Create)); + doc.Open(); + PdfContentByte cb = writer.DirectContent; + + float startX = 3.63f * mmToPt; + float currentX = startX; + float y = 15 * mmToPt; + + cb.SetColorFill(BaseColor.BLACK); + + DrawGuardBar(cb, currentX, y, (22.85f + 1.65f), mmToPt); + currentX += (0.15f + 0.2f) * mmToPt; + + foreach (char c in fullCode) + { + if (!char.IsDigit(c)) continue; + int digit = int.Parse(c.ToString()); + + float barWidth = (digit == 0) ? 1.35f : (0.15f * digit); + + if (digit != 0) + { + cb.Rectangle(currentX, y + (1.65f * mmToPt), barWidth * mmToPt, 22.85f * mmToPt); + cb.Fill(); + } + currentX += (barWidth + 0.2f) * mmToPt; + } + + DrawGuardBar(cb, currentX, y, (22.85f + 1.65f), mmToPt); + + BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, "Cp1251", BaseFont.NOT_EMBEDDED); + cb.BeginText(); + cb.SetFontAndSize(bf, 2.75f * mmToPt); + + float textY = y - (3.0f * mmToPt); + cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, fullCode, startX, textY, 0); + cb.EndText(); + + doc.Close(); + MessageBox.Show($"PDF сохранен: {filePath}"); + } + catch (Exception ex) + { + MessageBox.Show("Ошибка PDF: " + ex.Message); + } + } + + private void DrawGuardBar(PdfContentByte cb, float x, float y, float height, float mmToPt) + { + cb.Rectangle(x, y, 0.15f * mmToPt, height * mmToPt); + cb.Fill(); + } + + public ICommand AddServiceCommand => new RelayCommand(service => + { + if (service != null) + { + SelectedServices.Add(service); + CalculateTotal(); + } + }); + + public ICommand SearchPatientCommand => new RelayCommand(fio => + { + if (string.IsNullOrWhiteSpace(fio)) return; + + var parts = fio.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + string surname = parts[0]; + string firstName = parts.Length > 1 ? parts[1] : ""; + + // 1. Ищем в БД + var patient = db.Patients.FirstOrDefault(p => p.Surname == surname && p.FirstName == firstName); + + if (patient == null) + { + // 2. Если не нашли — открываем модальное окно + var addWin = new Views.AddPatientWindow(); + var vm = new AddPatientViewModel { Surname = surname, FirstName = firstName }; + addWin.DataContext = vm; + + if (addWin.ShowDialog() == true) + { + SelectedPatient = vm.SavedPatient; + } + } + else + { + SelectedPatient = patient; + } + }); + + private void CalculateTotal() + { + TotalCost = SelectedServices.Sum(s => s.Price); + OnPropertyChanged(nameof(TotalCost)); + } + + private void CheckAndAddPatient(string searchSurname, string searchName) + { + var patient = db.Patients.FirstOrDefault(p => p.Surname == searchSurname && p.FirstName == searchName); + + if (patient == null) + { + var addWin = new AddPatientWindow(); + var vm = new AddPatientViewModel { Surname = searchSurname, FirstName = searchName }; + addWin.DataContext = vm; + + if (addWin.ShowDialog() == true) + { + SelectedPatient = vm.SavedPatient; + } + } + else + { + SelectedPatient = patient; + } + } } } diff --git a/Labaratory/Labaratory/ViewModels/LoginViewModel.cs b/Labaratory/Labaratory/ViewModels/LoginViewModel.cs index 7ab7b0c..e48abdc 100644 --- a/Labaratory/Labaratory/ViewModels/LoginViewModel.cs +++ b/Labaratory/Labaratory/ViewModels/LoginViewModel.cs @@ -9,6 +9,7 @@ using System.Windows.Input; using Wpf.Ui.Input; using Labaratory.ViewModels; using Labaratory.Views; +using Labaratory.Models; namespace Labaratory { @@ -59,14 +60,14 @@ namespace Labaratory CaptchaText = Valid.GenerateCaptchaText(); CaptchaInput = string.Empty; } - private async void ExecuteLogin(object parameter) { if (CapchaVisibility == Visibility.Visible && !Valid.ValidateCaptcha(CaptchaInput, CaptchaText)) { + LogAttempt(Login, false); MessageBox.Show("Неверная капча!"); GenerateNewCaptcha(); - await LockSystem(10); //Блокировка на 10 сек + await LockSystem(10); return; } @@ -74,52 +75,40 @@ namespace Labaratory if (user != null) { + LogAttempt(Login, true); + MessageBox.Show($"Успешный вход! Добро пожаловать, {user.Login}"); if (parameter is Window window) { - if (user.Role.Value == 1) - { - var nextWindow = new AdminWindow(); - - var mainVM = new AdminModel(user); - nextWindow.DataContext = mainVM; - nextWindow.Show(); - } - if (user.Role.Value == 2) - { - var nextWindow = new ByhalterWindow(); - - var mainVM = new ByhalterModel(user); - nextWindow.DataContext = mainVM; - nextWindow.Show(); - } - if (user.Role.Value == 3) - { - var nextWindow = new Views.Laborant(); - - var mainVM = new ViewModels.Laborant(user); - nextWindow.DataContext = mainVM; - nextWindow.Show(); - } - if (user.Role.Value == 4) - { - var nextWindow = new Views.LaborantExplorer(); - - var mainVM = new ViewModels.LaborantExplorer(user); - nextWindow.DataContext = mainVM; - nextWindow.Show(); - } + Valid.OpenRoleWindow(user); window.Close(); } } else { + LogAttempt(Login, false); MessageBox.Show("Неверный логин или пароль"); CapchaVisibility = Visibility.Visible; GenerateNewCaptcha(); } } + private void LogAttempt(string login, bool isSuccess) + { + // Новый контекст гарантирует запись, даже если основной db "глючит" + using (var context = new Models.LaboratoryDBEntities()) + { + var log = new Models.LoggnHistory + { + Login = login ?? "Unknown", + AttemptTime = DateTime.Now, + IsSuccess = isSuccess + }; + context.LoggnHistories.Add(log); + context.SaveChanges(); + } + } + private async Task LockSystem(int seconds) { IsLoginEnabled = false; diff --git a/Labaratory/Labaratory/Views/AddPatientWindow.xaml b/Labaratory/Labaratory/Views/AddPatientWindow.xaml new file mode 100644 index 0000000..787eb6f --- /dev/null +++ b/Labaratory/Labaratory/Views/AddPatientWindow.xaml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Labaratory/Labaratory/Views/AddPatientWindow.xaml.cs b/Labaratory/Labaratory/Views/AddPatientWindow.xaml.cs new file mode 100644 index 0000000..43f73e5 --- /dev/null +++ b/Labaratory/Labaratory/Views/AddPatientWindow.xaml.cs @@ -0,0 +1,29 @@ +using Labaratory.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Labaratory.Views +{ + /// + /// Логика взаимодействия для AddPatientWindow.xaml + /// + public partial class AddPatientWindow : Window + { + public AddPatientWindow() + { + InitializeComponent(); + DataContext = new AddPatientViewModel(); + } + } +} diff --git a/Labaratory/Labaratory/Views/AdminWindow.xaml b/Labaratory/Labaratory/Views/AdminWindow.xaml index b6d039b..f9abaa6 100644 --- a/Labaratory/Labaratory/Views/AdminWindow.xaml +++ b/Labaratory/Labaratory/Views/AdminWindow.xaml @@ -12,7 +12,19 @@ - + + + + + + + + + + + diff --git a/Labaratory/Labaratory/Views/AdminWindow.xaml.cs b/Labaratory/Labaratory/Views/AdminWindow.xaml.cs index 2a2d137..622fd79 100644 --- a/Labaratory/Labaratory/Views/AdminWindow.xaml.cs +++ b/Labaratory/Labaratory/Views/AdminWindow.xaml.cs @@ -1,4 +1,6 @@ -using System; +using Labaratory.Models; +using Labaratory.ViewModels; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Labaratory/Labaratory/Views/LaborantWindow.xaml b/Labaratory/Labaratory/Views/LaborantWindow.xaml index 6d1d341..de9c05f 100644 --- a/Labaratory/Labaratory/Views/LaborantWindow.xaml +++ b/Labaratory/Labaratory/Views/LaborantWindow.xaml @@ -1,36 +1,148 @@  + + + + + - - - - + + + + + + + + - - - - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/Labaratory/Labaratory/Views/LaborantWindow.xaml.cs b/Labaratory/Labaratory/Views/LaborantWindow.xaml.cs index 428f865..029094a 100644 --- a/Labaratory/Labaratory/Views/LaborantWindow.xaml.cs +++ b/Labaratory/Labaratory/Views/LaborantWindow.xaml.cs @@ -1,4 +1,5 @@ -using System; +using Labaratory.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -22,7 +23,6 @@ namespace Labaratory.Views public Laborant() { InitializeComponent(); - DataContext = new Laborant(); } } } diff --git a/Labaratory/Labaratory/packages.config b/Labaratory/Labaratory/packages.config index c99e7e3..fe65b39 100644 --- a/Labaratory/Labaratory/packages.config +++ b/Labaratory/Labaratory/packages.config @@ -1,8 +1,9 @@  + - +