wanghan 7 mesi fa
parent
commit
356f6d4543
1 ha cambiato i file con 36 aggiunte e 1 eliminazioni
  1. 36 1
      TeamAAS-VM/ViewModels/Product/ProductParamsViewModel.cs

+ 36 - 1
TeamAAS-VM/ViewModels/Product/ProductParamsViewModel.cs

@@ -249,6 +249,7 @@ namespace TeamAAS_VP.ViewModels.Product
         /// </summary>
         async void ExecuteNextCommand()
         {
+            ResetId();
             if (MessageBox.Show(Lang.是否保存产品.Replace("[{0}]", ""), Lang.保存产品, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
             {
                 var waiting = new WaitingControl();
@@ -281,7 +282,41 @@ namespace TeamAAS_VP.ViewModels.Product
             param.Add("SelectProduct", SelectProduct);
             _regionManager.RequestNavigate("ProductRegionContext", "ProductHome", param);
         }
-
+        private void ResetId()
+        {
+            if (FixedUpCamera1Procedure == null)
+            {
+                SelectProduct.FixedUpCamera1ProcedureId = Guid.Empty;
+            }
+            if (FixedUpCamera2Procedure == null)
+            {
+                SelectProduct.FixedUpCamera2ProcedureId = Guid.Empty;
+            }
+            if (FixedDownCamera1Procedure == null)
+            {
+                SelectProduct.FixedDownCamera1ProcedureId = Guid.Empty;
+            }
+            if (FixedDownCamera2Procedure == null)
+            {
+                SelectProduct.FixedDownCamera2ProcedureId = Guid.Empty;
+            }
+            if (MoveDownCamera1LockPhotoProcedure == null)
+            {
+                SelectProduct.MoveDownCamera1LockPhotoProcedureId = Guid.Empty;
+            }
+            if (MoveDownCamera2LockPhotoProcedure == null)
+            {
+                SelectProduct.MoveDownCamera2LockPhotoProcedureId = Guid.Empty;
+            }
+            if (MoveDownCamer1PickPhotoProcedureId == null)
+            {
+                SelectProduct.MoveDownCamer1PickPhotoProcedureId = Guid.Empty;
+            }
+            if (MoveDownCamer2PickPhotoProcedureId == null)
+            {
+                SelectProduct.MoveDownCamer2PickPhotoProcedureId = Guid.Empty;
+            }
+        }
         /// <summary>
         /// 上一步
         /// </summary>