Esempio n. 1
0
        public void ConvertJsonOrderToDDSTest()
        {
            string fileName = "order_example.json"; // TODO: 初始化为适当的值

            OrderDDSConverter.ConvertJsonOrderToDDS(fileName);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Esempio n. 2
0
 private void StartProduceBtn_Click(object sender, RoutedEventArgs e)
 {
     MessageBoxResult result = MessageBox.Show("Confirm Start?");
     if (result.Equals(MessageBoxResult.OK))
     {
         try
         {
             OrderService s = new OrderService();
             Msg<string> msg = s.GetOrderItemForProduce(orderItem.Id,mirror);
             if (msg.Result)
             {
                 if (OrderItemFile.WirteToFile(orderItem.FileName, msg.Object))
                 {
                     if (OrderDDSConverter.ConvertJsonOrderToDDS(orderItem.FileName))
                     {
                         MessageBox.Show("Order Created, Please Use EASY to work!");
                         s.SetOrderItemTool(orderItem.ItemNr,currentTool1,currentTool2);
                         this.Close();
                     }
                 }
             }
             else
             {
                 MessageBox.Show(msg.Content);
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
             LogUtil.Logger.Error(ex.Message);
         }
     }
 }