diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 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 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/RefundSpdPage.xaml b/SubCabinetSolution/Views/RefundSpdPage.xaml
index ab58e89..3584013 100644
--- a/SubCabinetSolution/Views/RefundSpdPage.xaml
+++ b/SubCabinetSolution/Views/RefundSpdPage.xaml
@@ -8,6 +8,434 @@
Title="RefundSpdPage"
d:DesignHeight="450"
d:DesignWidth="800"
+ Background="White"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/RefundSpdPage.xaml b/SubCabinetSolution/Views/RefundSpdPage.xaml
index ab58e89..3584013 100644
--- a/SubCabinetSolution/Views/RefundSpdPage.xaml
+++ b/SubCabinetSolution/Views/RefundSpdPage.xaml
@@ -8,6 +8,434 @@
Title="RefundSpdPage"
d:DesignHeight="450"
d:DesignWidth="800"
+ Background="White"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
new file mode 100644
index 0000000..e3e1345
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/RefundSpdPage.xaml b/SubCabinetSolution/Views/RefundSpdPage.xaml
index ab58e89..3584013 100644
--- a/SubCabinetSolution/Views/RefundSpdPage.xaml
+++ b/SubCabinetSolution/Views/RefundSpdPage.xaml
@@ -8,6 +8,434 @@
Title="RefundSpdPage"
d:DesignHeight="450"
d:DesignWidth="800"
+ Background="White"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
new file mode 100644
index 0000000..e3e1345
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml.cs b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
new file mode 100644
index 0000000..f3f1a95
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class SpdQueryPage : Page
+ {
+ public SpdQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/RefundSpdPage.xaml b/SubCabinetSolution/Views/RefundSpdPage.xaml
index ab58e89..3584013 100644
--- a/SubCabinetSolution/Views/RefundSpdPage.xaml
+++ b/SubCabinetSolution/Views/RefundSpdPage.xaml
@@ -8,6 +8,434 @@
Title="RefundSpdPage"
d:DesignHeight="450"
d:DesignWidth="800"
+ Background="White"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
new file mode 100644
index 0000000..e3e1345
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml.cs b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
new file mode 100644
index 0000000..f3f1a95
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class SpdQueryPage : Page
+ {
+ public SpdQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml b/SubCabinetSolution/Views/TotalQueryPage.xaml
new file mode 100644
index 0000000..2d29a0c
--- /dev/null
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 21bd4ac..33a1957 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 336a9ca..ce01527 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -166,15 +166,23 @@
+
+
+
+
+
+
+
+
AddUserDialog.xaml
@@ -188,15 +196,33 @@
CabinetWindow.xaml
+
+ ConsumeQueryPage.xaml
+
EmergencyPage.xaml
+
+ GoodsQueryPage.xaml
+
InquirePage.xaml
InventoryPage.xaml
+
+ InventoryQueryPage.xaml
+
+
+ MonitorQueryPage.xaml
+
+
+ NotReturnedQueryPage.xaml
+
+
+ PutCabinetQueryPage.xaml
+
PutGoodsPage.xaml
@@ -212,6 +238,12 @@
SettingsPage.xaml
+
+ SpdQueryPage.xaml
+
+
+ TotalQueryPage.xaml
+
MSBuild:Compile
Designer
@@ -228,17 +260,25 @@
+
+
Designer
MSBuild:Compile
+
+
+
+
+
+
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index 385fbcf..d97c297 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -122,11 +122,14 @@
private void ItemSelectionChanged(object sender)
{
- if (!(sender is FunctionModel functionModel))
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
{
return;
}
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+
this.MainTopImage = functionModel.Image;
this.MainTopTitle = functionModel.Title;
var navigationService = ServiceLocator.Current.GetInstance();
@@ -157,6 +160,8 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
+
+ listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
new file mode 100644
index 0000000..1a9353b
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class ConsumeQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
new file mode 100644
index 0000000..9b6fb3d
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/GoodsQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class GoodsQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
index 301e1aa..85d3e15 100644
--- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs
@@ -1,16 +1,21 @@
using System.Collections.Generic;
+using System.Windows.Controls;
+using CommonServiceLocator;
using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Views;
using SubCabinetSolution.Model;
namespace SubCabinetSolution.ViewModel
{
public class InquirePageViewModel : ViewModelBase
{
- public List InquireModelList { get; set; }
+ public List InquireModels { get; set; }
+ public RelayCommand InquireSelectedCommand { get; set; }
public InquirePageViewModel()
{
- this.InquireModelList = new List
+ this.InquireModels = new List
{
new FunctionModel("/Images/库存查询.png", "库存查询"),
new FunctionModel("/Images/领用未归还.png", "领用未归还"),
@@ -21,6 +26,48 @@
new FunctionModel("/Images/监控查询.png", "监控查询"),
new FunctionModel("/Images/综合查询.png", "综合查询")
};
+ this.InquireSelectedCommand = new RelayCommand(InquireSelected);
+ }
+
+ private void InquireSelected(object sender)
+ {
+ var listBox = (ListBox)sender;
+ if (listBox.SelectedIndex == -1)
+ {
+ return;
+ }
+
+ var functionModel = (FunctionModel)listBox.SelectedItem;
+ var navigationService = ServiceLocator.Current.GetInstance();
+ switch (functionModel.Title)
+ {
+ case "库存查询":
+ navigationService.NavigateTo("InventoryQueryPage");
+ break;
+ case "领用未归还":
+ navigationService.NavigateTo("NotReturnedQueryPage");
+ break;
+ case "入柜查询":
+ navigationService.NavigateTo("PutCabinetQueryPage");
+ break;
+ case "退SPD查询":
+ navigationService.NavigateTo("SpdQueryPage");
+ break;
+ case "指定耗材查询":
+ navigationService.NavigateTo("GoodsQueryPage");
+ break;
+ case "消耗查询":
+ navigationService.NavigateTo("ConsumeQueryPage");
+ break;
+ case "监控查询":
+ navigationService.NavigateTo("MonitorQueryPage");
+ break;
+ case "综合查询":
+ navigationService.NavigateTo("TotalQueryPage");
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
new file mode 100644
index 0000000..d1a5d02
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/InventoryQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class InventoryQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
new file mode 100644
index 0000000..76f7a20
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/MonitorQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class MonitorQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
new file mode 100644
index 0000000..2529ef2
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/NotReturnedQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class NotReturnedQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
new file mode 100644
index 0000000..725e210
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/PutCabinetQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class PutCabinetQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
index 77800db..7342ff4 100644
--- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs
@@ -1,7 +1,45 @@
-namespace SubCabinetSolution.ViewModel
+using System.Collections.ObjectModel;
+using GalaSoft.MvvmLight;
+using SubCabinetSolution.Model;
+
+namespace SubCabinetSolution.ViewModel
{
- public class RefundSpdPageViewModel
+ public class RefundSpdPageViewModel: ViewModelBase
{
+ public ObservableCollection FirstDoorGoods { get; set; }
+ public ObservableCollection SecondDoorGoods { get; set; }
+ public ObservableCollection ThirdDoorGoods { get; set; }
+ public ObservableCollection FourthDoorGoods { get; set; }
+ public ObservableCollection FifthDoorGoods { get; set; }
+ public ObservableCollection SixthDoorGoods { get; set; }
+ public RefundSpdPageViewModel()
+ {
+ this.FirstDoorGoods = new ObservableCollection
+ {
+ new GoodsModel("止血纱布", "[19]"),
+ new GoodsModel("可吸收医用膜", "[89]"),
+ new GoodsModel("消融电极", "[59]"),
+ new GoodsModel("疝环充填补片", "[19]"),
+ new GoodsModel("微创扩展引流套", "[29]"),
+ new GoodsModel("创口贴", "[69]"),
+ new GoodsModel("一次性医用口罩", "[2]")
+ };
+ this.SecondDoorGoods = new ObservableCollection
+ {
+ };
+ this.ThirdDoorGoods = new ObservableCollection
+ {
+ };
+ this.FourthDoorGoods = new ObservableCollection
+ {
+ };
+ this.FifthDoorGoods = new ObservableCollection
+ {
+ };
+ this.SixthDoorGoods = new ObservableCollection
+ {
+ };
+ }
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
new file mode 100644
index 0000000..1c97f07
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/SpdQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class SpdQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs
@@ -0,0 +1,7 @@
+namespace SubCabinetSolution.ViewModel
+{
+ public class TotalQueryPageViewModel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/ViewModelLocator.cs b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
index 05121e1..f772a99 100644
--- a/SubCabinetSolution/ViewModel/ViewModelLocator.cs
+++ b/SubCabinetSolution/ViewModel/ViewModelLocator.cs
@@ -62,6 +62,7 @@
{
var service = new NavigationService();
+ // ���ѡ��
service.Configure("MainWindow",
new Uri("/SubCabinetSolution;component/Views/MainWindow.xaml", UriKind.Relative));
service.Configure("CabinetWindow",
@@ -83,10 +84,29 @@
service.Configure("CabinetMainPage",
new Uri("/SubCabinetSolution;component/Views/CabinetMainPage.xaml", UriKind.Relative));
+ // �ײ�ѡ��
service.Configure("SettingsPage",
new Uri("/SubCabinetSolution;component/Views/SettingsPage.xaml", UriKind.Relative));
service.Configure("RecentUsePage",
new Uri("/SubCabinetSolution;component/Views/RecentUsePage.xaml", UriKind.Relative));
+
+ // InquirePage�ֹ���
+ service.Configure("InventoryQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/InventoryQueryPage.xaml", UriKind.Relative));
+ service.Configure("NotReturnedQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/NotReturnedQueryPage.xaml", UriKind.Relative));
+ service.Configure("PutCabinetQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/PutCabinetQueryPage.xaml", UriKind.Relative));
+ service.Configure("SpdQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/SpdQueryPage.xaml", UriKind.Relative));
+ service.Configure("GoodsQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/GoodsQueryPage.xaml", UriKind.Relative));
+ service.Configure("ConsumeQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/ConsumeQueryPage.xaml", UriKind.Relative));
+ service.Configure("MonitorQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/MonitorQueryPage.xaml", UriKind.Relative));
+ service.Configure("TotalQueryPage",
+ new Uri("/SubCabinetSolution;component/Views/TotalQueryPage.xaml", UriKind.Relative));
return service;
}
@@ -115,6 +135,22 @@
public AddUserDialogViewModel AddUserDialog => ServiceLocator.Current.GetInstance();
+ public InventoryQueryPageViewModel InventoryQueryPage => ServiceLocator.Current.GetInstance();
+
+ public NotReturnedQueryPageViewModel NotReturnedQueryPage => ServiceLocator.Current.GetInstance();
+
+ public PutCabinetQueryPageViewModel PutCabinetQueryPage => ServiceLocator.Current.GetInstance();
+
+ public SpdQueryPageViewModel SpdQueryPage => ServiceLocator.Current.GetInstance();
+
+ public GoodsQueryPageViewModel GoodsQueryPage => ServiceLocator.Current.GetInstance();
+
+ public ConsumeQueryPageViewModel ConsumeQueryPage => ServiceLocator.Current.GetInstance();
+
+ public MonitorQueryPageViewModel MonitorQueryPage => ServiceLocator.Current.GetInstance();
+
+ public TotalQueryPageViewModel TotalQueryPage => ServiceLocator.Current.GetInstance();
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index 595f0fe..69d594e 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -88,7 +88,6 @@
-
+
@@ -162,7 +161,7 @@
-
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
new file mode 100644
index 0000000..9807598
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
new file mode 100644
index 0000000..bfa89e3
--- /dev/null
+++ b/SubCabinetSolution/Views/ConsumeQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class ConsumeQueryPage : Page
+ {
+ public ConsumeQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml b/SubCabinetSolution/Views/GoodsQueryPage.xaml
new file mode 100644
index 0000000..ff3c571
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
new file mode 100644
index 0000000..5233a86
--- /dev/null
+++ b/SubCabinetSolution/Views/GoodsQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class GoodsQueryPage : Page
+ {
+ public GoodsQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/InquirePage.xaml b/SubCabinetSolution/Views/InquirePage.xaml
index 9a07974..2bc5ca5 100644
--- a/SubCabinetSolution/Views/InquirePage.xaml
+++ b/SubCabinetSolution/Views/InquirePage.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="InquirePage"
d:DesignHeight="450"
@@ -31,7 +32,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0"
- ItemsSource="{Binding InquireModelList}">
+ ItemsSource="{Binding InquireModels}">
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml b/SubCabinetSolution/Views/InventoryQueryPage.xaml
new file mode 100644
index 0000000..32c0c67
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
new file mode 100644
index 0000000..e1ad62e
--- /dev/null
+++ b/SubCabinetSolution/Views/InventoryQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class InventoryQueryPage : Page
+ {
+ public InventoryQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
new file mode 100644
index 0000000..fe248b7
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
new file mode 100644
index 0000000..4b765bb
--- /dev/null
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class MonitorQueryPage : Page
+ {
+ public MonitorQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
new file mode 100644
index 0000000..db7b499
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
new file mode 100644
index 0000000..09565e9
--- /dev/null
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class NotReturnedQueryPage : Page
+ {
+ public NotReturnedQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
new file mode 100644
index 0000000..9d51467
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
new file mode 100644
index 0000000..23f5181
--- /dev/null
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class PutCabinetQueryPage : Page
+ {
+ public PutCabinetQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/RefundSpdPage.xaml b/SubCabinetSolution/Views/RefundSpdPage.xaml
index ab58e89..3584013 100644
--- a/SubCabinetSolution/Views/RefundSpdPage.xaml
+++ b/SubCabinetSolution/Views/RefundSpdPage.xaml
@@ -8,6 +8,434 @@
Title="RefundSpdPage"
d:DesignHeight="450"
d:DesignWidth="800"
+ Background="White"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
new file mode 100644
index 0000000..e3e1345
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml.cs b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
new file mode 100644
index 0000000..f3f1a95
--- /dev/null
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class SpdQueryPage : Page
+ {
+ public SpdQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml b/SubCabinetSolution/Views/TotalQueryPage.xaml
new file mode 100644
index 0000000..2d29a0c
--- /dev/null
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml.cs b/SubCabinetSolution/Views/TotalQueryPage.xaml.cs
new file mode 100644
index 0000000..62e5b5c
--- /dev/null
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml.cs
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace SubCabinetSolution.Views
+{
+ public partial class TotalQueryPage : Page
+ {
+ public TotalQueryPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file