Beispiel #1
0
 public BindingList <TestForGrid> AddConcreteTest(BindingList <TestForGrid> testGrids, string orderNumber)
 {
     foreach (var testGrid in testGrids)
     {
         var dtoConcreteTest = new DtoConcreteTest1()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Test = new DtoTest2()
             {
                 Code = testGrid.Code
             },
         };
         testGrid.ConcreteCode = OrderService.AddConcreteTest(dtoConcreteTest);
     }
     return(testGrids);
 }
Beispiel #2
0
 public BindingList <TestForGrid> EditConcreteTest(BindingList <TestForGrid> testGrids, string orderNumber)
 {
     foreach (var testGrid in testGrids)
     {
         if (string.IsNullOrEmpty(testGrid.ConcreteCode))
         {
             var dtoConcreteTest = new DtoConcreteTest1()
             {
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber
                 },
                 Test = new DtoTest2()
                 {
                     Code = testGrid.Code
                 },
             };
             testGrid.ConcreteCode = OrderService.AddConcreteTest(dtoConcreteTest);
         }
         else
         {
             var dtoConcreteTest = new DtoConcreteTest1()
             {
                 Code  = testGrid.ConcreteCode,
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber,
                 },
                 Test = new DtoTest2()
                 {
                     Code = testGrid.Code
                 },
             };
             OrderService.EditConcreteTest(dtoConcreteTest);
         }
     }
     return(testGrids);
 }
Beispiel #3
0
 public BindingList<TestForGrid> EditConcreteTest(BindingList<TestForGrid> testGrids, string orderNumber)
 {
     foreach (var testGrid in testGrids)
     {
         if (string.IsNullOrEmpty(testGrid.ConcreteCode))
         {
             var dtoConcreteTest = new DtoConcreteTest1()
             {
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber
                 },
                 Test = new DtoTest2()
                 {
                     Code = testGrid.Code
                 },
             };
             testGrid.ConcreteCode = OrderService.AddConcreteTest(dtoConcreteTest);
         }
         else
         {
             var dtoConcreteTest = new DtoConcreteTest1()
             {
                 Code = testGrid.ConcreteCode,
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber,
                 },
                 Test = new DtoTest2()
                 {
                     Code = testGrid.Code
                 },
             };
             OrderService.EditConcreteTest(dtoConcreteTest);
         }
     }
     return testGrids;
 }
Beispiel #4
0
 public BindingList<TestForGrid> AddConcreteTest(BindingList<TestForGrid> testGrids, string orderNumber)
 {
     foreach (var testGrid in testGrids)
     {
         var dtoConcreteTest = new DtoConcreteTest1()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Test = new DtoTest2()
             {
                 Code = testGrid.Code
             },
         };
         testGrid.ConcreteCode= OrderService.AddConcreteTest(dtoConcreteTest);
     }
     return testGrids;
 }