diff --git a/DM_Weight/Converter/OpenBoxConverter.cs b/DM_Weight/Converter/OpenBoxConverter.cs
index 75beeb7..0e69327 100644
--- a/DM_Weight/Converter/OpenBoxConverter.cs
+++ b/DM_Weight/Converter/OpenBoxConverter.cs
@@ -13,8 +13,8 @@ namespace DM_Weight.Converter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- int status = int.Parse(value.ToString());
- if(status == 3||status==35)
+ bool status = bool.Parse(value.ToString());
+ if(status)
{
return Visibility.Visible;
}
diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
index 8e00c99..fc76775 100644
--- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
@@ -33,6 +33,13 @@ namespace DM_Weight.ViewModels
set => SetProperty(ref _channelStocks, value);
}
+ private bool _openBoxVisibility = false;
+ public bool OpenBoxVisibility
+ {
+ get => _openBoxVisibility;
+ set=>SetProperty(ref _openBoxVisibility, value);
+ }
+
private static readonly DateTime Jan1st1970 = new DateTime
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
diff --git a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
index 8409556..5427c0e 100644
--- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
@@ -39,7 +39,12 @@ namespace DM_Weight.ViewModels
private static readonly DateTime Jan1st1970 = new DateTime
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
-
+ private bool _openBoxVisibility=false;
+ public bool OpenBoxVisibility
+ {
+ get => _openBoxVisibility;
+ set => SetProperty(ref _openBoxVisibility, value);
+ }
private PortUtil _portUtil;
IEventAggregator _eventAggregator;
@@ -445,6 +450,8 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.Quantity > 0)
.OrderBy(cs => cs.ColNo)
.ToList();
+
+ OpenBoxVisibility = queryData[0].BoardType == 3 ? true : queryData[0].BoardType == 35 ? true : false ;
ChannelStocks = queryData;
}
diff --git a/DM_Weight/Views/DrawerAddDrugWindow.xaml b/DM_Weight/Views/DrawerAddDrugWindow.xaml
index b92d110..bc94b4d 100644
--- a/DM_Weight/Views/DrawerAddDrugWindow.xaml
+++ b/DM_Weight/Views/DrawerAddDrugWindow.xaml
@@ -12,8 +12,10 @@
+
-
+
+
@@ -21,7 +23,7 @@
-
+
@@ -295,8 +297,8 @@
-
+
diff --git a/DM_Weight/Views/DrawerTakeDrugWindow.xaml b/DM_Weight/Views/DrawerTakeDrugWindow.xaml
index 6390bac..c741bb1 100644
--- a/DM_Weight/Views/DrawerTakeDrugWindow.xaml
+++ b/DM_Weight/Views/DrawerTakeDrugWindow.xaml
@@ -15,12 +15,15 @@
+
+
+
@@ -200,7 +203,7 @@
-
+