コード例 #1
0
 private void OKBtn_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(PartNRTB.Text) || string.IsNullOrWhiteSpace(QuantityTB.Text) ||
         string.IsNullOrWhiteSpace(WarehouseNRTB.Text) || string.IsNullOrWhiteSpace(PositionNRTB.Text))
     {
         MessageBox.Show("请将数据填写完整");
     }
     else
     {
         StorageManageServiceClient client = new StorageManageServiceClient();
         Message msg = client.PartInStore(PartNRTB.Text, "", int.Parse(QuantityTB.Text),
                                          string.IsNullOrEmpty(FIFODP.Text) ? DateTime.Parse(DateTime.Now.ToShortDateString()) : DateTime.Parse(FIFODP.Text), WarehouseNRTB.Text, PositionNRTB.Text);
         MessageBox.Show(msg.Content);
     }
 }
コード例 #2
0
 private void OKBtn_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(PartNRTB.Text) || string.IsNullOrWhiteSpace(QuantityTB.Text)
         || string.IsNullOrWhiteSpace(WarehouseNRTB.Text) || string.IsNullOrWhiteSpace(PositionNRTB.Text))
     {
         MessageBox.Show("请将数据填写完整");
     }
     else
     {
         StorageManageServiceClient client = new StorageManageServiceClient();
         Message msg= client.PartInStore(PartNRTB.Text, "", int.Parse(QuantityTB.Text),
             string.IsNullOrEmpty(FIFODP.Text) ? DateTime.Parse(DateTime.Now.ToShortDateString()) : DateTime.Parse(FIFODP.Text), WarehouseNRTB.Text, PositionNRTB.Text);
         MessageBox.Show(msg.Content);
     }
 }