first edit

This commit is contained in:
Курнат Андрей
2026-01-31 16:11:36 +03:00
commit f0e11d6379
148 changed files with 6986 additions and 0 deletions

10
XLIMS.SP/AssemblyInfo.cs Normal file
View File

@@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@@ -0,0 +1,20 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:XLIMS.SP.ViewModels"
xmlns:v="clr-namespace:XLIMS.SP.Views">
<DataTemplate DataType="{x:Type vm:BookViewModel}">
<v:BookView/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SpoiViewModel}">
<v:SpoiView/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SpnmtpViewModel}">
<v:SpnmtpView/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:PersonalViewModel}">
<v:PersonalView/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:DivisionViewModel}">
<v:DivisionView/>
</DataTemplate>
</ResourceDictionary>

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class BookViewModel:ViewModelBase
{
#region Constructor
public BookViewModel(ILimsService limsService,BookSet bookSet=null)
{
_limsService = limsService;
if (bookSet != null) _bookSet = bookSet;
else _bookSet = new BookSet();
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly BookSet _bookSet;
#endregion //Fields
#region Properties
public string? Number
{
get => _bookSet.Number;
set { _bookSet.Number = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_bookSet.Id == 0) await _limsService.Books.AddAsync(_bookSet);
else await _limsService.Books.UpdateAsync(_bookSet);
}
public async Task Remove()
{
await _limsService.Books.RemoveAsync(_bookSet);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class BooksViewModel:ViewModelBase
{
#region Constructor
public BooksViewModel(ILimsService limsService,IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
_limsService.Books.SetChanged += OnBooksChanged;
LoadDataAsync();
}
#endregion //Constructor
#region Events
private async void OnBooksChanged()
{
await LoadDataAsync();
}
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly IDialogService _dialogService;
private bool _isLoading;
private BookViewModel _currentBook;
#endregion //Fields
#region Properties
public ObservableCollection<BookViewModel> AllBooks { get; set; } = new();
public BookViewModel CurrentBook
{
get=>_currentBook;
set { _currentBook = value; OnPropertyChanged(); }
}
public bool IsLoading
{
get => _isLoading;
set { _isLoading = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
public async Task LoadDataAsync()
{
IsLoading = true;
try
{
// Параллельная загрузка данных из разных доменов через подсервисы
var booksTask = await _limsService.Books.GetAllAsync();
AllBooks = new ObservableCollection<BookViewModel>(booksTask.Select(s => new BookViewModel(_limsService, s)));
OnPropertyChanged(nameof(AllBooks));
}
finally
{
IsLoading = false;
}
}
private void Add()
{
_dialogService.ShowDialog(new BookViewModel(_limsService));
}
private void Edit()
{
_dialogService.ShowDialog(CurrentBook);
}
private async Task DelAsync()
{
await CurrentBook.Remove();
AllBooks.Remove(CurrentBook);
OnPropertyChanged(nameof(AllBooks));
}
#endregion //Methods
#region Commands
public ICommand AddCommand =>new RelayCommand(p=> Add());
public ICommand EditCommand => new RelayCommand(p => Edit(),p=>CurrentBook!=null);
public ICommand DelCommand => new AsyncRelayCommand(DelAsync, ()=>CurrentBook != null);
#endregion //Commands
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class DeviceViewModel : ViewModelBase
{
#region Constructor
public DeviceViewModel(ILimsService limsService, DivisionSet division, DeviceSet device = null)
{
_limsService = limsService;
if (device != null) _device = device;
else _device = new DeviceSet() { DivisionId = division.Id };
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly DeviceSet _device;
#endregion //Fields
#region Properties
public string? Tip
{
get => _device.Tip;
set { _device.Tip = value; OnPropertyChanged(); }
}
public int Id => _device.Id;
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_device.Id == 0) await _limsService.Devices.AddAsync(_device);
else await _limsService.Devices.UpdateAsync(_device);
}
public async Task Remove()
{
await _limsService.Devices.RemoveAsync(_device);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class DivisionViewModel : ViewModelBase
{
#region Constructor
public DivisionViewModel(ILimsService limsService, DivisionSet division = null)
{
_limsService = limsService;
if (division != null) _division = division;
else _division = new DivisionSet();
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly DivisionSet _division;
#endregion //Fields
#region Properties
public int? Kdl
{
get => _division.Kdl;
set { _division.Kdl = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_division.Id == 0) await _limsService.Divisions.AddAsync(_division);
else await _limsService.Divisions.UpdateAsync(_division);
}
public async Task Remove()
{
await _limsService.Divisions.RemoveAsync(_division);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class DivisionsViewModel : ViewModelBase
{
#region Constructor
public DivisionsViewModel(ILimsService limsService, IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
_limsService.Divisions.SetChanged += OnDivisionsChanged;
LoadDataAsync();
}
#endregion //Constructor
#region Events
private async void OnDivisionsChanged()
{
await LoadDataAsync();
}
#endregion //Events
#region Fields
private readonly IDialogService _dialogService;
private readonly ILimsService _limsService;
private bool _isLoading;
private DivisionViewModel _currentDivision;
#endregion //Fields
#region Properties
public ObservableCollection<DivisionViewModel> AllDivisions { get; set; } = new();
public DivisionViewModel CurrentDivision
{
get => _currentDivision;
set { _currentDivision = value; OnPropertyChanged(); }
}
public bool IsLoading
{
get => _isLoading;
set { _isLoading = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
public async Task LoadDataAsync()
{
IsLoading = true;
try
{
// Параллельная загрузка данных из разных доменов через подсервисы
var divisionsTask = await _limsService.Divisions.GetAllAsync();
AllDivisions = new ObservableCollection<DivisionViewModel>(divisionsTask.Select(s => new DivisionViewModel(_limsService, s)));
OnPropertyChanged(nameof(AllDivisions));
}
finally
{
IsLoading = false;
}
}
private void Add()
{
_dialogService.ShowDialog(new DivisionViewModel(_limsService));
}
private void Edit()
{
_dialogService.ShowDialog(CurrentDivision);
}
private async Task DelAsync()
{
await CurrentDivision.Remove();
AllDivisions.Remove(CurrentDivision);
OnPropertyChanged(nameof(AllDivisions));
}
#endregion //Methods
#region Commands
public ICommand AddCommand => new RelayCommand(p => Add());
public ICommand EditCommand => new RelayCommand(p => Edit(), p => CurrentDivision != null);
public ICommand DelCommand => new AsyncRelayCommand(DelAsync, () => CurrentDivision != null);
#endregion //Commands
}
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.MVVM.Base;
using XLIMS.SP.Views;
namespace XLIMS.SP.ViewModels
{
public class MainViewModel : ViewModelBase, IActivityViewModel
{
#region Constructor
public MainViewModel(ILimsService limsService, IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly IDialogService _dialogService;
#endregion //Fields
#region Properties
public string Title => "Словари";
public object View => new MainView();
#endregion //Properties
#region Methods
#endregion //Methods
#region Commands
#endregion //Commands
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class PersonalViewModel : ViewModelBase
{
#region Constructor
public PersonalViewModel(ILimsService limsService, PersonalSet personal = null)
{
_limsService = limsService;
if (personal != null) _personal = personal;
else _personal = new PersonalSet();
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly PersonalSet _personal;
#endregion //Fields
#region Properties
public string? Person
{
get => _personal.Person;
set { _personal.Person = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_personal.Id == 0) await _limsService.Personals.AddAsync(_personal);
else await _limsService.Personals.UpdateAsync(_personal);
}
public async Task Remove()
{
await _limsService.Personals.RemoveAsync(_personal);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class PersonalsViewModel : ViewModelBase
{
#region Constructor
public PersonalsViewModel(ILimsService limsService, IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
_limsService.Personals.SetChanged += OnPersonalsChanged;
LoadDataAsync();
}
#endregion //Constructor
#region Events
private async void OnPersonalsChanged()
{
await LoadDataAsync();
}
#endregion //Events
#region Fields
private readonly IDialogService _dialogService;
private readonly ILimsService _limsService;
private bool _isLoading;
private PersonalViewModel _currentPersonal;
#endregion //Fields
#region Properties
public ObservableCollection<PersonalViewModel> AllPersonals { get; set; } = new();
public PersonalViewModel CurrentPersonal
{
get => _currentPersonal;
set { _currentPersonal = value; OnPropertyChanged(); }
}
public bool IsLoading
{
get => _isLoading;
set { _isLoading = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
public async Task LoadDataAsync()
{
IsLoading = true;
try
{
// Параллельная загрузка данных из разных доменов через подсервисы
var personalsTask = await _limsService.Personals.GetAllAsync();
AllPersonals = new ObservableCollection<PersonalViewModel>(personalsTask.Select(s => new PersonalViewModel(_limsService, s)));
OnPropertyChanged(nameof(AllPersonals));
}
finally
{
IsLoading = false;
}
}
private void Add()
{
_dialogService.ShowDialog(new PersonalViewModel(_limsService));
}
private void Edit()
{
_dialogService.ShowDialog(CurrentPersonal);
}
private async Task DelAsync()
{
await CurrentPersonal.Remove();
AllPersonals.Remove(CurrentPersonal);
OnPropertyChanged(nameof(AllPersonals));
}
#endregion //Methods
#region Commands
public ICommand AddCommand => new RelayCommand(p => Add());
public ICommand EditCommand => new RelayCommand(p => Edit(), p => CurrentPersonal != null);
public ICommand DelCommand => new AsyncRelayCommand(DelAsync, () => CurrentPersonal != null);
#endregion //Commands
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class SpnmtpViewModel:ViewModelBase
{
#region Constructor
public SpnmtpViewModel(ILimsService limsService, Spnmtp spnmtp = null)
{
_limsService = limsService;
if (spnmtp != null) _spnmtp = spnmtp;
else _spnmtp = new Spnmtp();
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly Spnmtp _spnmtp;
#endregion //Fields
#region Properties
public string? Nmtp
{
get => _spnmtp.Nmtp;
set { _spnmtp.Nmtp = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_spnmtp.Id == 0) await _limsService.Spnmtps.AddAsync(_spnmtp);
else await _limsService.Spnmtps.UpdateAsync(_spnmtp);
}
public async Task Remove()
{
await _limsService.Spnmtps.RemoveAsync(_spnmtp);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class SpnmtpsViewModel:ViewModelBase
{
#region Constructor
public SpnmtpsViewModel(ILimsService limsService, IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
_limsService.Spnmtps.SetChanged += OnSpnmtpsChanged;
LoadDataAsync();
}
#endregion //Constructor
#region Events
private async void OnSpnmtpsChanged()
{
await LoadDataAsync();
}
#endregion //Events
#region Fields
private readonly IDialogService _dialogService;
private readonly ILimsService _limsService;
private bool _isLoading;
private SpnmtpViewModel _currentSpnmtp;
#endregion //Fields
#region Properties
public ObservableCollection<SpnmtpViewModel> AllSpnmtps { get; set; } = new();
public SpnmtpViewModel CurrentSpnmtp
{
get => _currentSpnmtp;
set { _currentSpnmtp = value; OnPropertyChanged(); }
}
public bool IsLoading
{
get => _isLoading;
set { _isLoading = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
public async Task LoadDataAsync()
{
IsLoading = true;
try
{
// Параллельная загрузка данных из разных доменов через подсервисы
var spnmtpsTask = await _limsService.Spnmtps.GetAllAsync();
AllSpnmtps = new ObservableCollection<SpnmtpViewModel>(spnmtpsTask.Select(s => new SpnmtpViewModel(_limsService, s)));
OnPropertyChanged(nameof(AllSpnmtps));
}
finally
{
IsLoading = false;
}
}
private void Add()
{
_dialogService.ShowDialog(new SpnmtpViewModel(_limsService));
}
private void Edit()
{
_dialogService.ShowDialog(CurrentSpnmtp);
}
private async Task DelAsync()
{
await CurrentSpnmtp.Remove();
AllSpnmtps.Remove(CurrentSpnmtp);
OnPropertyChanged(nameof(AllSpnmtps));
}
#endregion //Methods
#region Commands
public ICommand AddCommand => new RelayCommand(p => Add());
public ICommand EditCommand => new RelayCommand(p => Edit(), p => CurrentSpnmtp != null);
public ICommand DelCommand => new AsyncRelayCommand(DelAsync, () => CurrentSpnmtp != null);
#endregion //Commands
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.DATA.Models;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class SpoiViewModel:ViewModelBase
{
#region Constructor
public SpoiViewModel(ILimsService limsService, Spoi spoi = null)
{
_limsService = limsService;
if (spoi != null) _spoi = spoi;
else _spoi = new Spoi();
}
#endregion //Constructor
#region Events
#endregion //Events
#region Fields
private readonly ILimsService _limsService;
private readonly Spoi _spoi;
#endregion //Fields
#region Properties
public string? Nmoi
{
get => _spoi.Nmoi;
set { _spoi.Nmoi = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
private async Task SaveAsync()
{
if (_spoi.Id == 0) await _limsService.Spois.AddAsync(_spoi);
else await _limsService.Spois.UpdateAsync(_spoi);
}
public async Task Remove()
{
await _limsService.Spois.RemoveAsync(_spoi);
}
#endregion //Methods
#region Commands
public ICommand SaveCommand => new AsyncRelayCommand(SaveAsync);
#endregion //Commands
}
}

View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows.Input;
using XLIMS.CONTRACT;
using XLIMS.MVVM.Base;
namespace XLIMS.SP.ViewModels
{
public class SpoisViewModel:ViewModelBase
{
#region Constructor
public SpoisViewModel(ILimsService limsService,IDialogService dialogService)
{
_limsService = limsService;
_dialogService = dialogService;
_limsService.Spois.SetChanged += OnSpoisChanged;
LoadDataAsync();
}
#endregion //Constructor
#region Events
private async void OnSpoisChanged()
{
await LoadDataAsync();
}
#endregion //Events
#region Fields
private readonly IDialogService _dialogService;
private readonly ILimsService _limsService;
private bool _isLoading;
private SpoiViewModel _currentSpoi;
#endregion //Fields
#region Properties
public ObservableCollection<SpoiViewModel> AllSpois { get; set; } = new();
public SpoiViewModel CurrentSpoi
{
get => _currentSpoi;
set { _currentSpoi = value; OnPropertyChanged(); }
}
public bool IsLoading
{
get => _isLoading;
set { _isLoading = value; OnPropertyChanged(); }
}
#endregion //Properties
#region Methods
public async Task LoadDataAsync()
{
IsLoading = true;
try
{
// Параллельная загрузка данных из разных доменов через подсервисы
var spoisTask = await _limsService.Spois.GetAllAsync();
AllSpois = new ObservableCollection<SpoiViewModel>(spoisTask.Select(s => new SpoiViewModel(_limsService, s)));
OnPropertyChanged(nameof(AllSpois));
}
finally
{
IsLoading = false;
}
}
private void Add()
{
_dialogService.ShowDialog(new SpoiViewModel(_limsService));
}
private void Edit()
{
_dialogService.ShowDialog(CurrentSpoi);
}
private async Task DelAsync()
{
await CurrentSpoi.Remove();
AllSpois.Remove(CurrentSpoi);
OnPropertyChanged(nameof(AllSpois));
}
#endregion //Methods
#region Commands
public ICommand AddCommand => new RelayCommand(p => Add());
public ICommand EditCommand => new RelayCommand(p => Edit(), p => CurrentSpoi != null);
public ICommand DelCommand => new AsyncRelayCommand(DelAsync, () => CurrentSpoi != null);
#endregion //Commands
}
}

View File

@@ -0,0 +1,7 @@
<UserControl x:Class="XLIMS.SP.Views.BookView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<TextBox Text="{Binding Number,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для BookView.xaml
/// </summary>
public partial class BookView : UserControl
{
public BookView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,8 @@
<UserControl x:Class="XLIMS.SP.Views.DivisionView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid>
<TextBox Text="{Binding Kdl,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для DivisionView.xaml
/// </summary>
public partial class DivisionView : UserControl
{
public DivisionView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,8 @@
<UserControl x:Class="XLIMS.SP.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid>
<TextBlock Text="{Binding Title}" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для MainView.xaml
/// </summary>
public partial class MainView : UserControl
{
public MainView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,8 @@
<UserControl x:Class="XLIMS.SP.Views.PersonalView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid>
<TextBox Text="{Binding Person,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для PersonalView.xaml
/// </summary>
public partial class PersonalView : UserControl
{
public PersonalView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,8 @@
<UserControl x:Class="XLIMS.SP.Views.SpnmtpView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid>
<TextBox Text="{Binding Nmtp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для SpnmtpView.xaml
/// </summary>
public partial class SpnmtpView : UserControl
{
public SpnmtpView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,8 @@
<UserControl x:Class="XLIMS.SP.Views.SpoiView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid>
<TextBox Text="{Binding Nmoi,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace XLIMS.SP.Views
{
/// <summary>
/// Логика взаимодействия для SpoiView.xaml
/// </summary>
public partial class SpoiView : UserControl
{
public SpoiView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,33 @@
<Window x:Class="XLIMS.SP.Windows.BooksWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Книги учета регистрационных номеров"
WindowStartupLocation="CenterScreen"
Width="400" Height="600">
<Grid>
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding AllBooks}"
SelectedItem="{Binding CurrentBook,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить"
Command="{Binding AddCommand}"/>
<MenuItem Header="Изменить"
Command="{Binding EditCommand}"/>
<MenuItem Header="Удалить"
Command="{Binding DelCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Номер книги" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Number}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
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;
using XLIMS.SP.ViewModels;
namespace XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для BooksWindow.xaml
/// </summary>
public partial class BooksWindow : Window
{
public BooksWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,33 @@
<Window x:Class="XLIMS.SP.Windows.DivisionsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Подразделения"
WindowStartupLocation="CenterScreen"
Width="400" Height="600">
<Grid>
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding AllDivisions}"
SelectedItem="{Binding CurrentDivision,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить"
Command="{Binding AddCommand}"/>
<MenuItem Header="Изменить"
Command="{Binding EditCommand}"/>
<MenuItem Header="Удалить"
Command="{Binding DelCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Код подразделения" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Kdl}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
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 XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для DivisionsWindow.xaml
/// </summary>
public partial class DivisionsWindow : Window
{
public DivisionsWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,42 @@
<Window
x:Class="XLIMS.SP.Windows.EditWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding Title}"
DataContext="{Binding}"
ShowInTaskbar="True"
SizeToContent="WidthAndHeight"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="ToolWindow">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CoreDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<DockPanel LastChildFill="True">
<DockPanel
Margin="10"
DockPanel.Dock="Bottom"
LastChildFill="False">
<Button
Width="85"
Click="Button_Click_1"
Command="{Binding CancelCommand}"
Content="Отмена"
DockPanel.Dock="Right"
IsCancel="True" />
<Button
Width="85"
Margin="0,0,10,0"
Click="Button_Click_2"
Command="{Binding SaveCommand}"
Content="ОК"
DockPanel.Dock="Right"
IsDefault="True" />
</DockPanel>
<ContentControl Content="{Binding}" />
</DockPanel>
</Window>

View File

@@ -0,0 +1,37 @@
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 XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для EditWindow.xaml
/// </summary>
public partial class EditWindow : Window
{
public EditWindow()
{
InitializeComponent();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
DialogResult = false;
}
private void Button_Click_2(object sender, RoutedEventArgs e)
{
DialogResult = true;
}
}
}

View File

@@ -0,0 +1,33 @@
<Window x:Class="XLIMS.SP.Windows.PersonalsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Поверители"
WindowStartupLocation="CenterScreen"
Width="400" Height="600">
<Grid>
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding AllPersonals}"
SelectedItem="{Binding CurrentPersonal,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить"
Command="{Binding AddCommand}"/>
<MenuItem Header="Изменить"
Command="{Binding EditCommand}"/>
<MenuItem Header="Удалить"
Command="{Binding DelCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Фамилия, инициалы" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Person}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
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 XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для PersonalsWindow.xaml
/// </summary>
public partial class PersonalsWindow : Window
{
public PersonalsWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,33 @@
<Window x:Class="XLIMS.SP.Windows.SpnmtpsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Наименования СИ"
WindowStartupLocation="CenterScreen"
Width="400" Height="600">
<Grid>
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding AllSpnmtps}"
SelectedItem="{Binding CurrentSpnmtp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить"
Command="{Binding AddCommand}"/>
<MenuItem Header="Изменить"
Command="{Binding EditCommand}"/>
<MenuItem Header="Удалить"
Command="{Binding DelCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Наименование СИ" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Nmtp}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
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 XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для SpnmtpsWindow.xaml
/// </summary>
public partial class SpnmtpsWindow : Window
{
public SpnmtpsWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,33 @@
<Window x:Class="XLIMS.SP.Windows.SpoisWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Виды измерений"
WindowStartupLocation="CenterScreen"
Width="400" Height="600">
<Grid>
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding AllSpois}"
SelectedItem="{Binding CurrentSpoi,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить"
Command="{Binding AddCommand}"/>
<MenuItem Header="Изменить"
Command="{Binding EditCommand}"/>
<MenuItem Header="Удалить"
Command="{Binding DelCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Наименование измерения" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Nmoi}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
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 XLIMS.SP.Windows
{
/// <summary>
/// Логика взаимодействия для SpoisWindow.xaml
/// </summary>
public partial class SpoisWindow : Window
{
public SpoisWindow()
{
InitializeComponent();
}
}
}

49
XLIMS.SP/XLIMS.SP.csproj Normal file
View File

@@ -0,0 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\XLIMS.CONTRACT\XLIMS.CONTRACT.csproj" />
<ProjectReference Include="..\XLIMS.DATA\XLIMS.DATA.csproj" />
<ProjectReference Include="..\XLIMS.MVVM\XLIMS.MVVM.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\BookView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\DivisionView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\PersonalView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\SpnmtpView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\SpoiView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Windows\BooksWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Windows\DivisionsWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Windows\PersonalsWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Windows\SpnmtpsWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Windows\SpoisWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
</Project>