private void TheList_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            if (viewModel.Value != null)
            {
                switch (viewModel.Value.RoutingTo)
                {
                case InvoiceGroupViewModel.RouteTo.UsingClientDefDetailsView:
                {
                    Debug.WriteLine("Raising event in InvoiceGroupView");
                    RoutedMsgEventArgs args = new RoutedMsgEventArgs(RoutedMsgEvent, viewModel.Value.DefId, viewModel.Value.DefGrpName);
                    RaiseEvent(args);
                }
                break;

                case InvoiceGroupViewModel.RouteTo.UsingOverridesView:
                case InvoiceGroupViewModel.RouteTo.UsingClientDefWorkTypesView:
                {
                    Debug.WriteLine("Raising event in InvoiceGroupView");
                    RoutedOverrideEventArgs args = new RoutedOverrideEventArgs(RoutedOverRideEvent, viewModel.Value.DefId, viewModel.Value.DefGrpName);
                    RaiseEvent(args);
                }
                break;
                }
            }
        }
 // The DefaultIdChanged from the other view.
 public void OverrideIdChanged(object sender, RoutedOverrideEventArgs e)
 {
     if (IsInView)
     {
         viewModel.Value.SetOverride(e.Defid, e.DefGrpName);
         overRides.CommitEdit();
     }
 }
Example #3
0
        // The DefaultIdChanged from the other view.
        public void OverrideIdChanged(object sender, RoutedOverrideEventArgs e)
        {
            Debug.WriteLine("OverrideIdChanged hit at ClientDefWorkTypeView");

            if (e.Defid < 0)
            {
                viewModel.Value.SetOverRideGrp(-1, string.Empty);
            }
            else
            {
                viewModel.Value.SetOverRideGrp(e.Defid, e.DefGrpName);

                this.InvoiceGrpIdTextBox.Text = e.Defid.ToString();
                InvoiceGrpName.Text           = e.DefGrpName;
            }
            this.popLines.IsOpen = false;
        }