diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index f90a7a4..6a597d8 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -193,6 +193,7 @@
Designer
+
@@ -206,6 +207,7 @@
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index f90a7a4..6a597d8 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -193,6 +193,7 @@
Designer
+
@@ -206,6 +207,7 @@
+
diff --git a/SubCabinetSolution/Utils/DataBaseManager.cs b/SubCabinetSolution/Utils/DataBaseManager.cs
index 21137e1..7040ae6 100644
--- a/SubCabinetSolution/Utils/DataBaseManager.cs
+++ b/SubCabinetSolution/Utils/DataBaseManager.cs
@@ -13,7 +13,7 @@
public MySqlConnection GetConnection()
{
- MySqlConnection connection = new MySqlConnection(LocalConstant.MysqlConfig);
+ var connection = new MySqlConnection(LocalConstant.MysqlConfig);
connection.Open();
return connection;
}
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index f90a7a4..6a597d8 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -193,6 +193,7 @@
Designer
+
@@ -206,6 +207,7 @@
+
diff --git a/SubCabinetSolution/Utils/DataBaseManager.cs b/SubCabinetSolution/Utils/DataBaseManager.cs
index 21137e1..7040ae6 100644
--- a/SubCabinetSolution/Utils/DataBaseManager.cs
+++ b/SubCabinetSolution/Utils/DataBaseManager.cs
@@ -13,7 +13,7 @@
public MySqlConnection GetConnection()
{
- MySqlConnection connection = new MySqlConnection(LocalConstant.MysqlConfig);
+ var connection = new MySqlConnection(LocalConstant.MysqlConfig);
connection.Open();
return connection;
}
diff --git a/SubCabinetSolution/Utils/MessageToken.cs b/SubCabinetSolution/Utils/MessageToken.cs
new file mode 100644
index 0000000..68453c5
--- /dev/null
+++ b/SubCabinetSolution/Utils/MessageToken.cs
@@ -0,0 +1,10 @@
+namespace SubCabinetSolution.Utils
+{
+ public class MessageToken
+ {
+ public const string CloseMainWindow = "2022093001";
+ public const string CloseCabinetWindow = "2022101401";
+
+ public const string ChangeCabinetPage = "2022101402";
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index f90a7a4..6a597d8 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -193,6 +193,7 @@
Designer
+
@@ -206,6 +207,7 @@
+
diff --git a/SubCabinetSolution/Utils/DataBaseManager.cs b/SubCabinetSolution/Utils/DataBaseManager.cs
index 21137e1..7040ae6 100644
--- a/SubCabinetSolution/Utils/DataBaseManager.cs
+++ b/SubCabinetSolution/Utils/DataBaseManager.cs
@@ -13,7 +13,7 @@
public MySqlConnection GetConnection()
{
- MySqlConnection connection = new MySqlConnection(LocalConstant.MysqlConfig);
+ var connection = new MySqlConnection(LocalConstant.MysqlConfig);
connection.Open();
return connection;
}
diff --git a/SubCabinetSolution/Utils/MessageToken.cs b/SubCabinetSolution/Utils/MessageToken.cs
new file mode 100644
index 0000000..68453c5
--- /dev/null
+++ b/SubCabinetSolution/Utils/MessageToken.cs
@@ -0,0 +1,10 @@
+namespace SubCabinetSolution.Utils
+{
+ public class MessageToken
+ {
+ public const string CloseMainWindow = "2022093001";
+ public const string CloseCabinetWindow = "2022101401";
+
+ public const string ChangeCabinetPage = "2022101402";
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
index 669ad99..c07ce7c 100644
--- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
@@ -1,11 +1,15 @@
using System.Collections.ObjectModel;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class AdoptionPageViewModel : ViewModelBase
{
+ public RelayCommand GoBackCommand { get; set; }
public ObservableCollection SurgeryModels { get; set; }
public ObservableCollection SurgeryGoodsModels { get; set; }
@@ -38,6 +42,12 @@
Description = null
}
};
+
+ GoBackCommand = new RelayCommand(() =>
+ {
+ ServiceLocator.Current.GetInstance().NavigateTo("CabinetMainPage");
+ //Messenger.Default.Send(MessageToken.ChangeCabinetPage);
+ });
}
}
}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index f877e47..f04a43b 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index 7d84139..861cfc6 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -18,28 +18,6 @@
-
-
-
-
diff --git a/SubCabinetSolution/Model/ConsumableModel.cs b/SubCabinetSolution/Model/ConsumableModel.cs
new file mode 100644
index 0000000..a3ff87c
--- /dev/null
+++ b/SubCabinetSolution/Model/ConsumableModel.cs
@@ -0,0 +1,9 @@
+namespace SubCabinetSolution.Model
+{
+ public class ConsumableModel
+ {
+ public string OperatePerson { get; set; }
+ public string OperateTime { get; set; }
+ public string BusinessType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index f90a7a4..6a597d8 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -193,6 +193,7 @@
Designer
+
@@ -206,6 +207,7 @@
+
diff --git a/SubCabinetSolution/Utils/DataBaseManager.cs b/SubCabinetSolution/Utils/DataBaseManager.cs
index 21137e1..7040ae6 100644
--- a/SubCabinetSolution/Utils/DataBaseManager.cs
+++ b/SubCabinetSolution/Utils/DataBaseManager.cs
@@ -13,7 +13,7 @@
public MySqlConnection GetConnection()
{
- MySqlConnection connection = new MySqlConnection(LocalConstant.MysqlConfig);
+ var connection = new MySqlConnection(LocalConstant.MysqlConfig);
connection.Open();
return connection;
}
diff --git a/SubCabinetSolution/Utils/MessageToken.cs b/SubCabinetSolution/Utils/MessageToken.cs
new file mode 100644
index 0000000..68453c5
--- /dev/null
+++ b/SubCabinetSolution/Utils/MessageToken.cs
@@ -0,0 +1,10 @@
+namespace SubCabinetSolution.Utils
+{
+ public class MessageToken
+ {
+ public const string CloseMainWindow = "2022093001";
+ public const string CloseCabinetWindow = "2022101401";
+
+ public const string ChangeCabinetPage = "2022101402";
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
index 669ad99..c07ce7c 100644
--- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs
@@ -1,11 +1,15 @@
using System.Collections.ObjectModel;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class AdoptionPageViewModel : ViewModelBase
{
+ public RelayCommand GoBackCommand { get; set; }
public ObservableCollection SurgeryModels { get; set; }
public ObservableCollection SurgeryGoodsModels { get; set; }
@@ -38,6 +42,12 @@
Description = null
}
};
+
+ GoBackCommand = new RelayCommand(() =>
+ {
+ ServiceLocator.Current.GetInstance().NavigateTo("CabinetMainPage");
+ //Messenger.Default.Send(MessageToken.ChangeCabinetPage);
+ });
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 2f0cfe3..23ee8a9 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -6,30 +6,30 @@
using CommonServiceLocator;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Messaging;
using GalaSoft.MvvmLight.Views;
using Newtonsoft.Json;
using SubCabinetSolution.Model;
using SubCabinetSolution.Utils;
-using SubCabinetSolution.Views;
using MessageBox = HandyControl.Controls.MessageBox;
namespace SubCabinetSolution.ViewModel
{
public class CabinetViewModel : ViewModelBase
{
+ private string _currentTime;
+
public string CurrentTime
{
- get { return _currentTime; }
- set
+ get => _currentTime;
+ private set
{
_currentTime = value;
RaisePropertyChanged(() => CurrentTime);
}
}
- private string _currentTime;
-
- public RelayCommand LoginOutCommand { get; set; }
+ public RelayCommand LoginOutCommand { get; set; }
public List FunctionModels { get; set; }
public List SettingsModels { get; set; }
@@ -39,7 +39,7 @@
public string MainTopTitle
{
get => _mainTopTitle;
- set
+ private set
{
_mainTopTitle = value;
RaisePropertyChanged(() => MainTopTitle);
@@ -51,7 +51,7 @@
public string MainTopImage
{
get => _mainTopImage;
- set
+ private set
{
_mainTopImage = value;
RaisePropertyChanged(() => MainTopImage);
@@ -92,19 +92,18 @@
showTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
showTimer.Start();
- LoginOutCommand = new RelayCommand(LoginOut);
+ LoginOutCommand = new RelayCommand(() => { Messenger.Default.Send("", MessageToken.CloseCabinetWindow); });
// 初始化左侧功能列表
FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels();
// 初始化左侧底部功能列表
SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels();
-
+
FuncSelectedCommand = new RelayCommand