/// <summary> /// 明细修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ReviseDetail_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; FixtureFurnaceDetaiViewModel Detail = (FixtureFurnaceDetaiViewModel)btn.Tag;// as FixtureFurnaceMain; ChuckingDetailDialog view = new ChuckingDetailDialog(Detail, 0); bool?nullable = view.ShowDialog(); bool flag = true; if ((nullable.GetValueOrDefault() == flag ? (nullable.HasValue ? 1 : 0) : 0) == 0) { return; } //RefreshData(); HostDataGrid_SelectionChanged(null, null); }
/// <summary> /// 添加明细表信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; FixtureFurnaceMainEntity main = (FixtureFurnaceMainEntity)btn.Tag;// as FixtureFurnaceMain; FixtureFurnaceDetaiViewModel vmModel = new FixtureFurnaceDetaiViewModel(); ObjectReflection.AutoMapping(main, vmModel); bool?nullable = new ChuckingDetailDialog(vmModel, 1).ShowDialog(); bool flag = true; if ((nullable.GetValueOrDefault() == flag ? (nullable.HasValue ? 1 : 0) : 0) == 0) { return; } this.RefreshData(); }