Пук пук
parent
2832adf6b9
commit
4de787127f
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Controls.Templates;
|
using Avalonia.Controls.Templates;
|
||||||
using Policlinica.ViewModels;
|
using Policlinica.ViewModels;
|
||||||
using Policlinica.Views;
|
using Policlinica.Views;
|
||||||
|
|
@ -33,6 +35,16 @@ public class ViewLocator : IDataTemplate
|
||||||
sugarVm.SetView(sugarView);
|
sugarVm.SetView(sugarView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Специальная обработка для AdminViewModel
|
||||||
|
if (param is AdminViewModel adminVm)
|
||||||
|
{
|
||||||
|
// Получаем главное окно из ApplicationLifetime
|
||||||
|
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
adminVm.SetCloseAction(() => desktop.MainWindow?.Close());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Avalonia.Controls;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
@ -20,6 +21,7 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
private readonly UserRepository _userRepository;
|
private readonly UserRepository _userRepository;
|
||||||
private readonly DoctorRepository _doctorRepository;
|
private readonly DoctorRepository _doctorRepository;
|
||||||
private readonly ServiceRepository _serviceRepository;
|
private readonly ServiceRepository _serviceRepository;
|
||||||
|
private List<Record> _allRecords; // Сохраняем все записи для поиска
|
||||||
|
|
||||||
[ObservableProperty] string _login;
|
[ObservableProperty] string _login;
|
||||||
[ObservableProperty] int _id;
|
[ObservableProperty] int _id;
|
||||||
|
|
@ -27,6 +29,7 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
[ObservableProperty] private Record _selectedRecord;
|
[ObservableProperty] private Record _selectedRecord;
|
||||||
[ObservableProperty] private ObservableCollection<User> userList = new ObservableCollection<User>();
|
[ObservableProperty] private ObservableCollection<User> userList = new ObservableCollection<User>();
|
||||||
[ObservableProperty] string statusMessage = "";
|
[ObservableProperty] string statusMessage = "";
|
||||||
|
[ObservableProperty] string searchText = "";
|
||||||
|
|
||||||
[ObservableProperty] string editClientName = "";
|
[ObservableProperty] string editClientName = "";
|
||||||
[ObservableProperty] string editClientSurname = "";
|
[ObservableProperty] string editClientSurname = "";
|
||||||
|
|
@ -37,6 +40,8 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
[ObservableProperty] decimal editTotalAmount = 0;
|
[ObservableProperty] decimal editTotalAmount = 0;
|
||||||
[ObservableProperty] string editRecordDate = "";
|
[ObservableProperty] string editRecordDate = "";
|
||||||
|
|
||||||
|
private Action _closeAction;
|
||||||
|
|
||||||
public AdminViewModel(Navigation navigation, IServiceProvider provider, RecordRep recordRep, User user, UserRepository userRepository, DoctorRepository doctorRepository, ServiceRepository serviceRepository)
|
public AdminViewModel(Navigation navigation, IServiceProvider provider, RecordRep recordRep, User user, UserRepository userRepository, DoctorRepository doctorRepository, ServiceRepository serviceRepository)
|
||||||
{
|
{
|
||||||
_navigation = navigation;
|
_navigation = navigation;
|
||||||
|
|
@ -54,10 +59,16 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
Id = obj.Id;
|
Id = obj.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordsList = new ObservableCollection<Record>(recordRep.GetRecord(Id));
|
_allRecords = recordRep.GetRecord(Id);
|
||||||
|
RecordsList = new ObservableCollection<Record>(_allRecords);
|
||||||
DoctorList = new ObservableCollection<Doctor>(doctorRepository.GetDoctorsByTest());
|
DoctorList = new ObservableCollection<Doctor>(doctorRepository.GetDoctorsByTest());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetCloseAction(Action closeAction)
|
||||||
|
{
|
||||||
|
_closeAction = closeAction;
|
||||||
|
}
|
||||||
|
|
||||||
partial void OnSelectedRecordChanged(Record value)
|
partial void OnSelectedRecordChanged(Record value)
|
||||||
{
|
{
|
||||||
if (value != null)
|
if (value != null)
|
||||||
|
|
@ -93,6 +104,34 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
void SearchRecords()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(SearchText))
|
||||||
|
{
|
||||||
|
// Если поле поиска пусто, показываем все записи
|
||||||
|
RecordsList = new ObservableCollection<Record>(_allRecords);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Фильтруем записи по имени или фамилии клиента
|
||||||
|
var filteredRecords = _allRecords
|
||||||
|
.Where(r => r.ClientName.Contains(SearchText, StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
r.ClientSurname.Contains(SearchText, StringComparison.OrdinalIgnoreCase))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
RecordsList = new ObservableCollection<Record>(filteredRecords);
|
||||||
|
StatusMessage = $"Найдено {filteredRecords.Count} записей";
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
void ShowAllRecords()
|
||||||
|
{
|
||||||
|
SearchText = "";
|
||||||
|
RecordsList = new ObservableCollection<Record>(_allRecords);
|
||||||
|
StatusMessage = $"Показано {_allRecords.Count} записей";
|
||||||
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
void UpdateRecord()
|
void UpdateRecord()
|
||||||
{
|
{
|
||||||
|
|
@ -131,9 +170,11 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
if (updated)
|
if (updated)
|
||||||
{
|
{
|
||||||
StatusMessage = "Запись успешно обновлена";
|
StatusMessage = "Запись успешно обновлена";
|
||||||
RecordsList = new ObservableCollection<Record>(_recordRep.GetRecord(Id));
|
_allRecords = _recordRep.GetRecord(Id);
|
||||||
|
RecordsList = new ObservableCollection<Record>(_allRecords);
|
||||||
SelectedRecord = null;
|
SelectedRecord = null;
|
||||||
ClearEditFields();
|
ClearEditFields();
|
||||||
|
SearchText = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -174,9 +215,11 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
if (deleted)
|
if (deleted)
|
||||||
{
|
{
|
||||||
StatusMessage = "Запись успешно удалена";
|
StatusMessage = "Запись успешно удалена";
|
||||||
RecordsList = new ObservableCollection<Record>(_recordRep.GetRecord(Id));
|
_allRecords = _recordRep.GetRecord(Id);
|
||||||
|
RecordsList = new ObservableCollection<Record>(_allRecords);
|
||||||
SelectedRecord = null;
|
SelectedRecord = null;
|
||||||
ClearEditFields();
|
ClearEditFields();
|
||||||
|
SearchText = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -204,4 +247,11 @@ public partial class AdminViewModel : ViewModelBase
|
||||||
_navigation.Navigate(vm);
|
_navigation.Navigate(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
void ExitApplication()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exit button clicked");
|
||||||
|
_closeAction?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ public partial class DoctorViewModel : ViewModelBase
|
||||||
_provider = provider;
|
_provider = provider;
|
||||||
_doctorList = new ObservableCollection<Doctor>(repository.GetDoctorsByTest());
|
_doctorList = new ObservableCollection<Doctor>(repository.GetDoctorsByTest());
|
||||||
_navigation = navigation;
|
_navigation = navigation;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
|
|
@ -43,5 +41,12 @@ public partial class DoctorViewModel : ViewModelBase
|
||||||
var vm = ActivatorUtilities.CreateInstance<ServiceViewModel>(_provider, SelectedDoctor, repository, Name, Surname);
|
var vm = ActivatorUtilities.CreateInstance<ServiceViewModel>(_provider, SelectedDoctor, repository, Name, Surname);
|
||||||
_navigation.Navigate(vm);
|
_navigation.Navigate(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
public void GoBack()
|
||||||
|
{
|
||||||
|
var vm = ActivatorUtilities.CreateInstance<AdminViewModel>(_provider);
|
||||||
|
_navigation.Navigate(vm);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public partial class RecordItemsViewModel : ViewModelBase
|
||||||
int mainServiceId = selectedServices[0].Id;
|
int mainServiceId = selectedServices[0].Id;
|
||||||
Console.WriteLine($"Main service ID: {mainServiceId}");
|
Console.WriteLine($"Main service ID: {mainServiceId}");
|
||||||
Console.WriteLine($"Selected services count: {selectedServices.Count}");
|
Console.WriteLine($"Selected services count: {selectedServices.Count}");
|
||||||
|
|
||||||
var record = new Record
|
var record = new Record
|
||||||
{
|
{
|
||||||
ClientName = clientName,
|
ClientName = clientName,
|
||||||
|
|
@ -77,7 +77,7 @@ public partial class RecordItemsViewModel : ViewModelBase
|
||||||
};
|
};
|
||||||
|
|
||||||
Console.WriteLine($"Saving record: Name={record.ClientName}, Surname={record.ClientSurname}, DoctorId={record.DoctorId}, UserId={record.UserId}, ServiceId={record.ServiceId}");
|
Console.WriteLine($"Saving record: Name={record.ClientName}, Surname={record.ClientSurname}, DoctorId={record.DoctorId}, UserId={record.UserId}, ServiceId={record.ServiceId}");
|
||||||
|
|
||||||
int recordId = _recordRepository.InsertRecord(record);
|
int recordId = _recordRepository.InsertRecord(record);
|
||||||
|
|
||||||
if (recordId <= 0)
|
if (recordId <= 0)
|
||||||
|
|
@ -88,7 +88,7 @@ public partial class RecordItemsViewModel : ViewModelBase
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine($"Record saved with ID: {recordId}");
|
Console.WriteLine($"Record saved with ID: {recordId}");
|
||||||
|
|
||||||
foreach (var service in selectedServices)
|
foreach (var service in selectedServices)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Saving record item for service: {service.Id} (price: {service.Price})");
|
Console.WriteLine($"Saving record item for service: {service.Id} (price: {service.Price})");
|
||||||
|
|
@ -120,7 +120,7 @@ public partial class RecordItemsViewModel : ViewModelBase
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void Cancel()
|
public void GoBack()
|
||||||
{
|
{
|
||||||
var repository = _provider.GetRequiredService<ServiceRepository>();
|
var repository = _provider.GetRequiredService<ServiceRepository>();
|
||||||
var vm = ActivatorUtilities.CreateInstance<ServiceViewModel>(_provider, selectedDoctor, repository, clientName, clientSurname);
|
var vm = ActivatorUtilities.CreateInstance<ServiceViewModel>(_provider, selectedDoctor, repository, clientName, clientSurname);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
@ -14,16 +14,33 @@ public partial class RegistrationViewModel : ViewModelBase
|
||||||
private readonly Navigation _navigation;
|
private readonly Navigation _navigation;
|
||||||
private readonly IServiceProvider _provider;
|
private readonly IServiceProvider _provider;
|
||||||
|
|
||||||
[ObservableProperty] private string _password;
|
[ObservableProperty] private string _password = "";
|
||||||
[ObservableProperty] private string _login;
|
[ObservableProperty] private string _login = "";
|
||||||
[ObservableProperty] public string _eror;
|
[ObservableProperty] public string _eror = "";
|
||||||
|
|
||||||
public RegistrationViewModel(IServiceProvider serviceProvider, Navigation navigation, IServiceProvider provider)
|
public RegistrationViewModel(IServiceProvider serviceProvider, Navigation navigation, IServiceProvider provider)
|
||||||
{
|
{
|
||||||
_serviceProvider = serviceProvider;
|
_serviceProvider = serviceProvider;
|
||||||
_navigation = navigation;
|
_navigation = navigation;
|
||||||
_provider = provider;
|
_provider = provider;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnPasswordChanged(string value)
|
||||||
|
{
|
||||||
|
// Ограничиваем пароль до 8 символов
|
||||||
|
if (value != null && value.Length > 8)
|
||||||
|
{
|
||||||
|
Password = value.Substring(0, 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnLoginChanged(string value)
|
||||||
|
{
|
||||||
|
// Ограничиваем логин до 15 символов
|
||||||
|
if (value != null && value.Length > 15)
|
||||||
|
{
|
||||||
|
Login = value.Substring(0, 15);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
|
|
@ -31,12 +48,28 @@ public partial class RegistrationViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
var vm = _serviceProvider.GetRequiredService<AutorizationViewModel>();
|
var vm = _serviceProvider.GetRequiredService<AutorizationViewModel>();
|
||||||
_navigation.Navigate(vm);
|
_navigation.Navigate(vm);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
void Registration()
|
void Registration()
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(Login))
|
||||||
|
{
|
||||||
|
Eror = "Логин не может быть пустым";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(Password))
|
||||||
|
{
|
||||||
|
Eror = "Пароль не может быть пустым";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Password.Length < 4)
|
||||||
|
{
|
||||||
|
Eror = "Пароль должен быть минимум 4 символа";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
using (UserRepository repository = _provider.GetRequiredService<UserRepository>())
|
using (UserRepository repository = _provider.GetRequiredService<UserRepository>())
|
||||||
{
|
{
|
||||||
|
|
@ -46,6 +79,7 @@ public partial class RegistrationViewModel : ViewModelBase
|
||||||
Eror = "Такой логин уже существует";
|
Eror = "Такой логин уже существует";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var user = new User()
|
var user = new User()
|
||||||
{
|
{
|
||||||
Name = Login,
|
Name = Login,
|
||||||
|
|
@ -61,7 +95,4 @@ public partial class RegistrationViewModel : ViewModelBase
|
||||||
_navigation.Navigate(vm);
|
_navigation.Navigate(vm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public partial class ServiceViewModel : ViewModelBase
|
||||||
name = clientName;
|
name = clientName;
|
||||||
surname = clientSurname;
|
surname = clientSurname;
|
||||||
Services = new ObservableCollection<ServiceSelected>(repository.GetServicesByDoctors(selectedDoctor.Id).Select(service => new ServiceSelected(service)).ToList());
|
Services = new ObservableCollection<ServiceSelected>(repository.GetServicesByDoctors(selectedDoctor.Id).Select(service => new ServiceSelected(service)).ToList());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,12 +54,20 @@ public partial class ServiceViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var recordRepository = _provider.GetRequiredService<RecordRep>();
|
var recordRepository = _provider.GetRequiredService<RecordRep>();
|
||||||
var recordItemsRepository = _provider.GetRequiredService<RecordItemsRepository>();
|
var recordItemsRepository = _provider.GetRequiredService<RecordItemsRepository>();
|
||||||
|
|
||||||
var vm = ActivatorUtilities.CreateInstance<RecordItemsViewModel>(_provider,
|
var vm = ActivatorUtilities.CreateInstance<RecordItemsViewModel>(_provider,
|
||||||
_navigation, _selectedDoctor, selectedServices, recordRepository, recordItemsRepository, Name, Surname);
|
_navigation, _selectedDoctor, selectedServices, recordRepository, recordItemsRepository, Name, Surname);
|
||||||
|
|
||||||
_navigation.Navigate(vm);
|
_navigation.Navigate(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
public void GoBack()
|
||||||
|
{
|
||||||
|
var vm = ActivatorUtilities.CreateInstance<DoctorViewModel>(_provider);
|
||||||
|
_navigation.Navigate(vm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,47 +12,88 @@
|
||||||
<Setter Property="Background" Value="White"/>
|
<Setter Property="Background" Value="White"/>
|
||||||
<Setter Property="Foreground" Value="Black"/>
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
<Setter Property="CaretBrush" Value="Red"/>
|
<Setter Property="CaretBrush" Value="Red"/>
|
||||||
<Setter Property="SelectionBrush" Value="LightBlue"/>
|
|
||||||
<Setter Property="BorderBrush" Value="Black"/>
|
<Setter Property="BorderBrush" Value="Black"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
|
|
||||||
<ScrollViewer>
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Margin="30" Spacing="20">
|
<StackPanel Margin="30" Spacing="20">
|
||||||
<TextBlock Text="Управление записями" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center" Foreground="Black"/>
|
<!-- Заголовок с поиском и кнопкой выхода -->
|
||||||
|
<Grid ColumnDefinitions="*,Auto,Auto,Auto" Margin="0,0,0,10" VerticalAlignment="Center">
|
||||||
|
<TextBlock Grid.Column="0" Text="Управление записями" FontSize="24" FontWeight="Bold" Foreground="Black" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10">
|
||||||
|
<TextBox Text="{Binding SearchText}"
|
||||||
|
Watermark="Поиск по имени/фамилии"
|
||||||
|
Width="200"
|
||||||
|
Padding="10"
|
||||||
|
FontSize="13"/>
|
||||||
|
<Button Content="Искать"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="15,8"
|
||||||
|
Background="Blue"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding SearchRecordsCommand}"/>
|
||||||
|
<Button Content="Показать все"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="15,8"
|
||||||
|
Background="Green"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding ShowAllRecordsCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Button Grid.Column="3" Content="Выход"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="15,8"
|
||||||
|
Background="Red"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding ExitApplicationCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
<!-- Таблица записей с ползунком -->
|
||||||
<StackPanel Spacing="10">
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="0" CornerRadius="5" ClipToBounds="True">
|
||||||
<TextBlock Text="Список записей (кликните для редактирования):" FontWeight="Bold" FontSize="16" Foreground="Black"/>
|
<StackPanel Spacing="0">
|
||||||
<DataGrid ItemsSource="{Binding RecordsList }" SelectedItem="{Binding SelectedRecord }" MinHeight="300">
|
<TextBlock Text="Список записей (кликните для редактирования):"
|
||||||
<DataGrid.Columns>
|
FontWeight="Bold" FontSize="16" Foreground="Black" Padding="15,15,15,10"/>
|
||||||
<DataGridCheckBoxColumn IsVisible="True"/>
|
<ScrollViewer MaxHeight="300" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||||
<DataGridTextColumn Binding="{Binding ClientName}" Header="Имя клиента"/>
|
<DataGrid ItemsSource="{Binding RecordsList }"
|
||||||
<DataGridTextColumn Binding="{Binding ClientSurname}" Header="Фамилия клиента"/>
|
SelectedItem="{Binding SelectedRecord }"
|
||||||
<DataGridTextColumn Binding="{Binding Title}" Header="Врач"/>
|
Width="1100"
|
||||||
<DataGridTextColumn Binding="{Binding TotalAmount}" Header="Цена"/>
|
CanUserResizeColumns="True"
|
||||||
<DataGridTextColumn Binding="{Binding ServiceName}" Header="Услуга"/>
|
CanUserSortColumns="True">
|
||||||
<DataGridTextColumn Binding="{Binding RecordDate}" Header="Дата"/>
|
<DataGrid.Columns>
|
||||||
</DataGrid.Columns>
|
<DataGridCheckBoxColumn IsVisible="True"/>
|
||||||
</DataGrid>
|
<DataGridTextColumn Binding="{Binding ClientName}" Header="Имя клиента" Width="150"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding ClientSurname}" Header="Фамилия клиента" Width="150"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding Title}" Header="Врач" Width="150"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding TotalAmount}" Header="Цена" Width="100"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding ServiceName}" Header="Услуга" Width="200"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding RecordDate}" Header="Дата" Width="200"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</ScrollViewer>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Форма редактирования -->
|
||||||
<Border BorderBrush="DodgerBlue" BorderThickness="2" Padding="20" CornerRadius="5" Background="White">
|
<Border BorderBrush="DodgerBlue" BorderThickness="2" Padding="20" CornerRadius="5" Background="White">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Редактирование записи:" FontWeight="Bold" FontSize="16" Foreground="Black"/>
|
<TextBlock Text="Редактирование записи:" FontWeight="Bold" FontSize="16" Foreground="Black"/>
|
||||||
|
|
||||||
|
<!-- Имя клиента -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Имя клиента:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Имя клиента:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<TextBox Text="{Binding EditClientName}" Padding="12" FontSize="14"/>
|
<TextBox Text="{Binding EditClientName}" Padding="12" FontSize="14"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Фамилия клиента -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Фамилия клиента:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Фамилия клиента:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<TextBox Text="{Binding EditClientSurname}" Padding="12" FontSize="14"/>
|
<TextBox Text="{Binding EditClientSurname}" Padding="12" FontSize="14"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Врач -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Врач:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Врач:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<ComboBox ItemsSource="{Binding DoctorList}"
|
<ComboBox ItemsSource="{Binding DoctorList}"
|
||||||
|
|
@ -60,7 +101,8 @@
|
||||||
DisplayMemberBinding="{Binding Title}"
|
DisplayMemberBinding="{Binding Title}"
|
||||||
Padding="12" FontSize="14" Background="White" Foreground="Black"/>
|
Padding="12" FontSize="14" Background="White" Foreground="Black"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Услуга (зависит от выбранного врача) -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Услуга:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Услуга:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<ComboBox ItemsSource="{Binding EditServiceList}"
|
<ComboBox ItemsSource="{Binding EditServiceList}"
|
||||||
|
|
@ -68,21 +110,27 @@
|
||||||
DisplayMemberBinding="{Binding ServiceName}"
|
DisplayMemberBinding="{Binding ServiceName}"
|
||||||
Padding="12" FontSize="14" Background="White" Foreground="Black"/>
|
Padding="12" FontSize="14" Background="White" Foreground="Black"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Сумма (только для отображения) -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Сумма:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Сумма:" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<TextBox Text="{Binding EditTotalAmount}" Padding="12" FontSize="14"/>
|
<Border Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="1" Padding="12" CornerRadius="3">
|
||||||
|
<TextBlock Text="{Binding EditTotalAmount}" FontSize="14" Foreground="Black"/>
|
||||||
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Дата -->
|
||||||
<StackPanel Spacing="8">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Дата (YYYY-MM-DD):" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
<TextBlock Text="Дата (YYYY-MM-DD):" FontWeight="Bold" Foreground="Black" FontSize="14"/>
|
||||||
<TextBox Text="{Binding EditRecordDate}" Padding="12" FontSize="14"/>
|
<TextBox Text="{Binding EditRecordDate}" Padding="12" FontSize="14"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Сообщение статуса -->
|
||||||
<TextBlock Text="{Binding StatusMessage}" Foreground="Green" FontSize="14" TextWrapping="Wrap"/>
|
<TextBlock Text="{Binding StatusMessage}" Foreground="Green" FontSize="14" TextWrapping="Wrap"/>
|
||||||
|
|
||||||
|
<!-- Кнопки -->
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
|
||||||
<Button Content="Обновить запись"
|
<Button Content="Обновить запись"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,50 @@
|
||||||
xmlns:vm="using:Policlinica.ViewModels"
|
xmlns:vm="using:Policlinica.ViewModels"
|
||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="500"
|
||||||
x:Class="Policlinica.Views.AutorizationView"
|
x:Class="Policlinica.Views.AutorizationView"
|
||||||
x:DataType="vm:AutorizationViewModel">
|
x:DataType="vm:AutorizationViewModel">
|
||||||
|
|
||||||
<Border BorderBrush="Aqua" CornerRadius="8" BorderThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
<UserControl.Styles>
|
||||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
<Style Selector="TextBox">
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
<TextBlock Text="Вход" FontSize="20" FontWeight="Bold" HorizontalAlignment="Center"/>
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
|
<Setter Property="CaretBrush" Value="Red"/>
|
||||||
<TextBlock Text="Логин:" />
|
<Setter Property="BorderBrush" Value="Black"/>
|
||||||
<TextBox Text="{Binding Login}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<TextBlock Text="Пароль:" />
|
<Setter Property="Padding" Value="10"/>
|
||||||
<TextBox Text="{Binding Password}"/>
|
<Setter Property="FontSize" Value="14"/>
|
||||||
<TextBlock Text="{Binding Eror}" Foreground="Red"/>
|
</Style>
|
||||||
<StackPanel Orientation="Horizontal">
|
</UserControl.Styles>
|
||||||
<Button Content="Продолжить"
|
|
||||||
Command="{Binding ContiCommand}"/>
|
<Border BorderBrush="DodgerBlue" CornerRadius="8" BorderThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20" Padding="30" Background="White">
|
||||||
<HyperlinkButton Content="Регистрация"
|
<StackPanel Spacing="15" Width="400">
|
||||||
Command="{Binding OpenRegWinCommand}"/>
|
<TextBlock Text="Авторизация" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center" Foreground="Black"/>
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
<StackPanel Spacing="8">
|
||||||
|
<TextBlock Text="Логин:" FontWeight="Bold" Foreground="Black"/>
|
||||||
|
<TextBox Text="{Binding Login}" Watermark="Введите логин"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Spacing="8">
|
||||||
|
<TextBlock Text="Пароль:" FontWeight="Bold" Foreground="Black"/>
|
||||||
|
<TextBox Text="{Binding Password}" Watermark="Введите пароль"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Eror}" Foreground="Red" FontSize="12" TextWrapping="Wrap"/>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="0,15,0,0">
|
||||||
|
<Button Content="Продолжить"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="15,10"
|
||||||
|
Background="Blue"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding ContiCommand}"/>
|
||||||
|
<HyperlinkButton Content="Регистрация"
|
||||||
|
FontSize="14"
|
||||||
|
Foreground="Blue"
|
||||||
|
Command="{Binding OpenRegWinCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<TextBlock Text="Создание записи" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center"/>
|
<TextBlock Text="Создание записи" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center"/>
|
||||||
|
|
||||||
|
<!-- Ввод имени клиента -->
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
<StackPanel Spacing="10">
|
<StackPanel Spacing="10">
|
||||||
<TextBlock Text="Имя клиента:" FontWeight="Bold" FontSize="14"/>
|
<TextBlock Text="Имя клиента:" FontWeight="Bold" FontSize="14"/>
|
||||||
|
|
@ -18,13 +19,15 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Ввод фамилии клиента -->
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
<StackPanel Spacing="10">
|
<StackPanel Spacing="10">
|
||||||
<TextBlock Text="Фамилия клиента:" FontWeight="Bold" FontSize="14"/>
|
<TextBlock Text="Фамилия клиента:" FontWeight="Bold" FontSize="14"/>
|
||||||
<TextBox Text="{Binding Surname}" Padding="10" FontSize="13" Watermark="Введите фамилию"/>
|
<TextBox Text="{Binding Surname}" Padding="10" FontSize="13" Watermark="Введите фамилию"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Выбор врача -->
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
<StackPanel Spacing="10">
|
<StackPanel Spacing="10">
|
||||||
<TextBlock Text="Выберите врача:" FontWeight="Bold" FontSize="14"/>
|
<TextBlock Text="Выберите врача:" FontWeight="Bold" FontSize="14"/>
|
||||||
|
|
@ -35,13 +38,21 @@
|
||||||
FontSize="13"/>
|
FontSize="13"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Button Content="Далее"
|
<!-- Кнопки -->
|
||||||
FontSize="16"
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
|
||||||
Padding="20,12"
|
<Button Content="Далее"
|
||||||
Background="Green"
|
FontSize="16"
|
||||||
Foreground="White"
|
Padding="20,12"
|
||||||
HorizontalAlignment="Center"
|
Background="Green"
|
||||||
Command="{Binding StartTestCommand}"/>
|
Foreground="White"
|
||||||
|
Command="{Binding StartTestCommand}"/>
|
||||||
|
<Button Content="Назад"
|
||||||
|
FontSize="16"
|
||||||
|
Padding="20,12"
|
||||||
|
Background="Gray"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding GoBackCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -7,64 +7,75 @@
|
||||||
x:Class="Policlinica.Views.RecordItemsView"
|
x:Class="Policlinica.Views.RecordItemsView"
|
||||||
x:DataType="viewModels:RecordItemsViewModel">
|
x:DataType="viewModels:RecordItemsViewModel">
|
||||||
|
|
||||||
<StackPanel Margin="30" Spacing="20">
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<TextBlock Text="Подтверждение записи" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center"/>
|
<StackPanel Margin="30" Spacing="20">
|
||||||
|
<!-- Заголовок -->
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
<TextBlock Text="Подтверждение записи" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center"/>
|
||||||
<StackPanel Spacing="10">
|
|
||||||
<TextBlock Text="Клиент:" FontWeight="Bold" FontSize="16"/>
|
<!-- Информация о клиенте -->
|
||||||
<TextBlock Text="{Binding ClientName}" FontSize="14"/>
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
<TextBlock Text="{Binding ClientSurname}" FontSize="14"/>
|
<StackPanel Spacing="10">
|
||||||
|
<TextBlock Text="Клиент:" FontWeight="Bold" FontSize="16"/>
|
||||||
|
<TextBlock Text="{Binding ClientName}" FontSize="14"/>
|
||||||
|
<TextBlock Text="{Binding ClientSurname}" FontSize="14"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Информация о враче -->
|
||||||
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
|
<StackPanel Spacing="10">
|
||||||
|
<TextBlock Text="Врач:" FontWeight="Bold" FontSize="16"/>
|
||||||
|
<TextBlock Text="{Binding SelectedDoctor.Title}" FontSize="14"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Выбранные услуги -->
|
||||||
|
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
||||||
|
<StackPanel Spacing="10">
|
||||||
|
<TextBlock Text="Выбранные услуги:" FontWeight="Bold" FontSize="16"/>
|
||||||
|
|
||||||
|
<ScrollViewer MaxHeight="200" VerticalScrollBarVisibility="Auto">
|
||||||
|
<ListBox ItemsSource="{Binding SelectedServices}">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20" Margin="5">
|
||||||
|
<TextBlock Text="{Binding ServiceName}" Width="300" FontSize="13"/>
|
||||||
|
<TextBlock Text="{Binding Price}" Width="100" FontSize="13"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</ScrollViewer>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Итоговая сумма -->
|
||||||
|
<Border BorderBrush="DodgerBlue" BorderThickness="2" Padding="20" CornerRadius="5" Background="WhiteSmoke">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="30">
|
||||||
|
<TextBlock Text="Итого:" FontWeight="Bold" FontSize="16"/>
|
||||||
|
<TextBlock Text="{Binding TotalAmount}" FontSize="18" FontWeight="Bold" Foreground="DodgerBlue"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Сообщение статуса -->
|
||||||
|
<TextBlock Text="{Binding StatusMessage}" Foreground="Green" FontSize="14" TextWrapping="Wrap"/>
|
||||||
|
|
||||||
|
<!-- Кнопки -->
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
|
||||||
|
<Button Content="Сохранить запись"
|
||||||
|
FontSize="16"
|
||||||
|
Padding="20,12"
|
||||||
|
Background="Green"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding SaveToDatabaseCommand}"/>
|
||||||
|
<Button Content="Назад"
|
||||||
|
FontSize="16"
|
||||||
|
Padding="20,12"
|
||||||
|
Background="Gray"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding GoBackCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
|
||||||
<StackPanel Spacing="10">
|
|
||||||
<TextBlock Text="Врач:" FontWeight="Bold" FontSize="16"/>
|
|
||||||
<TextBlock Text="{Binding SelectedDoctor.Title}" FontSize="14"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
|
|
||||||
<StackPanel Spacing="10">
|
|
||||||
<TextBlock Text="Выбранные услуги:" FontWeight="Bold" FontSize="16"/>
|
|
||||||
|
|
||||||
<ListBox ItemsSource="{Binding SelectedServices}" MinHeight="150">
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20" Margin="5">
|
|
||||||
<TextBlock Text="{Binding ServiceName}" Width="300" FontSize="13"/>
|
|
||||||
<TextBlock Text="{Binding Price}" Width="100" FontSize="13"/>
|
|
||||||
</StackPanel>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border BorderBrush="DodgerBlue" BorderThickness="2" Padding="20" CornerRadius="5" Background="WhiteSmoke">
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="30">
|
|
||||||
<TextBlock Text="Итого:" FontWeight="Bold" FontSize="16"/>
|
|
||||||
<TextBlock Text="{Binding TotalAmount}" FontSize="18" FontWeight="Bold" Foreground="DodgerBlue"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<TextBlock Text="{Binding StatusMessage}" Foreground="Green" FontSize="14" TextWrapping="Wrap"/>
|
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
|
|
||||||
<Button Content="Сохранить запись"
|
|
||||||
FontSize="16"
|
|
||||||
Padding="20,12"
|
|
||||||
Background="Green"
|
|
||||||
Foreground="White"
|
|
||||||
Command="{Binding SaveToDatabaseCommand}"/>
|
|
||||||
<Button Content="Вернуться"
|
|
||||||
FontSize="16"
|
|
||||||
Padding="20,12"
|
|
||||||
Background="Gray"
|
|
||||||
Foreground="White"
|
|
||||||
Command="{Binding CancelCommand}"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</ScrollViewer>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,52 @@
|
||||||
<UserControl xmlns="https://github.com/avaloniaui"
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
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:viewModels="clr-namespace:Policlinica.ViewModels"
|
xmlns:viewModels="clr-namespace:Policlinica.ViewModels"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="500"
|
||||||
x:Class="Policlinica.Views.RegistrationView"
|
x:Class="Policlinica.Views.RegistrationView"
|
||||||
x:DataType="viewModels:RegistrationViewModel">
|
x:DataType="viewModels:RegistrationViewModel">
|
||||||
|
|
||||||
|
<UserControl.Styles>
|
||||||
|
<Style Selector="TextBox">
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
|
<Setter Property="CaretBrush" Value="Red"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Black"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Padding" Value="10"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
</Style>
|
||||||
|
</UserControl.Styles>
|
||||||
|
|
||||||
<Border BorderBrush="Aqua" CornerRadius="8" BorderThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
<Border BorderBrush="DodgerBlue" CornerRadius="8" BorderThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20" Padding="30" Background="White">
|
||||||
<StackPanel Spacing="5">
|
<StackPanel Spacing="15" Width="400">
|
||||||
<Label FontWeight="Bold" Content="Регистрация" HorizontalAlignment="Center"/>
|
<TextBlock Text="Регистрация" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center" Foreground="Black"/>
|
||||||
<TextBlock Text="Логин" HorizontalAlignment="Center"/>
|
|
||||||
<TextBox Watermark="Придумайте имя" Text="{Binding Login}"/>
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Пароль" HorizontalAlignment="Center"/>
|
<TextBlock Text="Логин (макс. 15 символов):" FontWeight="Bold" Foreground="Black"/>
|
||||||
<TextBox Watermark="Придумайте пароль" Text="{Binding Password}"/>
|
<TextBox Watermark="Придумайте имя" Text="{Binding Login}" MaxLength="15"/>
|
||||||
<TextBlock Text="{Binding Eror}" Foreground="Red"/>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Button Content= "Зарегистрироваться" Command="{Binding RegistrationCommand}"/>
|
<StackPanel Spacing="8">
|
||||||
<HyperlinkButton Command="{Binding OpenAutorizationCommand}" Content="Авторизоваться"/>
|
<TextBlock Text="Пароль (макс. 8 символов):" FontWeight="Bold" Foreground="Black"/>
|
||||||
</StackPanel>
|
<TextBox Watermark="Придумайте пароль" Text="{Binding Password}" MaxLength="8"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Eror}" Foreground="Red" FontSize="12" TextWrapping="Wrap"/>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="0,15,0,0">
|
||||||
|
<Button Content="Зарегистрироваться"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="15,10"
|
||||||
|
Background="Green"
|
||||||
|
Foreground="White"
|
||||||
|
Command="{Binding RegistrationCommand}"/>
|
||||||
|
<HyperlinkButton Content="Авторизоваться"
|
||||||
|
FontSize="14"
|
||||||
|
Foreground="Blue"
|
||||||
|
Command="{Binding OpenAutorizationCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Padding="20,12"
|
Padding="20,12"
|
||||||
Background="Gray"
|
Background="Gray"
|
||||||
Foreground="White"/>
|
Foreground="White"
|
||||||
|
Command="{Binding GoBackCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Policlinica")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("Policlinica")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+42674a1eafd52a914f3b85957d38411bca2434ad")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2832adf6b90e33ade0e4dddb6ea06effb67f8d1e")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("Policlinica")]
|
[assembly: System.Reflection.AssemblyProductAttribute("Policlinica")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("Policlinica")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("Policlinica")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2b3375ad610e5fbc841535e991e0833d98ba70a8d5acdd80554ef8703e1f2a91
|
2780337f6c579f86204d6a118f92ae98da7690ac52f371d55d46561ef4b97617
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
{"documents":{"C:\\Users\\vikto\\RiderProjects\\Policlinica\\*":"https://raw.githubusercontent.com/Dezkriminant/Policlinica/42674a1eafd52a914f3b85957d38411bca2434ad/*"}}
|
{"documents":{"C:\\Users\\vikto\\RiderProjects\\Policlinica\\*":"https://raw.githubusercontent.com/Dezkriminant/Policlinica/2832adf6b90e33ade0e4dddb6ea06effb67f8d1e/*"}}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue