コード例 #1
0
 private void BtnEditDetial_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentStationCache.Id == null)
     {
         MessageBox.Show("请先选择主数据");
         return;
     }
     if (DGDetail.SelectedItems.Count > 1)
     {
         MessageBox.Show("每次只能选择一条");
         return;
     }
     else if (DGDetail.SelectedItem == null)
     {
         MessageBox.Show("请选择一行明细数据");
         return;
     }
     else
     {
         var a = (CutPlan)DGDetail.SelectedItem;
         WinCutPlanAddOrEdit win = new WinCutPlanAddOrEdit(a.Id, CurrentStationCache);
         win.ShowDialog();
         QueryDetail(CurrentStationCache);
     }
 }
コード例 #2
0
 private void BtnAddDetail_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentStationCache.Id == null)
     {
         MessageBox.Show("请先选择主数据");
         return;
     }
     else
     {
         WinCutPlanAddOrEdit win = new WinCutPlanAddOrEdit(null, CurrentStationCache);
         win.ShowDialog();
         QueryDetail(CurrentStationCache);
     }
 }