ManufacturingPacketApprovalControl.xaml.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Comal.Classes;
  2. using PRSDesktop.Panels.Staging;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace PRSDesktop
  18. {
  19. /// <summary>
  20. /// Interaction logic for ManufacturingPacketApprovalControl.xaml
  21. /// </summary>
  22. public partial class ManufacturingPacketApprovalControl : UserControl
  23. {
  24. private StagingSetout stagingsetout;
  25. public StagingSetout StagingSetout
  26. {
  27. get => stagingsetout;
  28. set
  29. {
  30. stagingsetout = value;
  31. packetGrid.StagingSetout = value;
  32. }
  33. }
  34. public ManufacturingPacketApprovalControl()
  35. {
  36. InitializeComponent();
  37. }
  38. private void CreatePacketButton_Click(object sender, RoutedEventArgs e)
  39. {
  40. var packet = new StagingManufacturingPacket();
  41. packet.StagingSetout.ID = stagingsetout.ID;
  42. packet.Job.ID = stagingsetout.JobLink.ID;
  43. var page = new StagingManufacturingPacketGrid();
  44. if (page.EditItems(new[] { packet }))
  45. packetGrid.Refresh(false, true);
  46. }
  47. }
  48. }