Exemplo n.º 1
0
 public BindingList <TubeForGrid> AddConcreteTube(BindingList <TubeForGrid> tubeGrids, string orderNumber)
 {
     foreach (var tubeGrid in tubeGrids)
     {
         var dtoConcreteTube = new DtoConcreteTube()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Tube = new DtoTube2()
             {
                 Code = tubeGrid.Code
             },
             ReceivedDt = tubeGrid.ReceivedDt
         };
         tubeGrid.ConcreteCode = OrderService.AddConcreteTube(dtoConcreteTube);
     }
     return(tubeGrids);
 }
Exemplo n.º 2
0
 public BindingList <TubeForGrid> EditConcreteTube(BindingList <TubeForGrid> tubeGrids, string orderNumber)
 {
     foreach (var tubeGrid in tubeGrids)
     {
         if (string.IsNullOrEmpty(tubeGrid.ConcreteCode))
         {
             var dtoConcreteTube = new DtoConcreteTube()
             {
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber
                 },
                 Tube = new DtoTube2()
                 {
                     Code = tubeGrid.Code
                 },
                 ReceivedDt = tubeGrid.ReceivedDt
             };
             tubeGrid.ConcreteCode = OrderService.AddConcreteTube(dtoConcreteTube);
         }
         else
         {
             var dtoConcreteTube = new DtoConcreteTube()
             {
                 Code = tubeGrid.ConcreteCode,
                 Tube = new DtoTube2()
                 {
                     Code = tubeGrid.Code
                 },
                 ReceivedDt = tubeGrid.ReceivedDt
             };
             OrderService.EditConcreteTube(dtoConcreteTube);
         }
     }
     return(tubeGrids);
 }
Exemplo n.º 3
0
 public BindingList<TubeForGrid> EditConcreteTube(BindingList<TubeForGrid> tubeGrids, string orderNumber)
 {
     foreach (var tubeGrid in tubeGrids)
     {
         if (string.IsNullOrEmpty(tubeGrid.ConcreteCode))
         {
             var dtoConcreteTube = new DtoConcreteTube()
             {
                 Order = new DtoOrder1()
                 {
                     Number = orderNumber
                 },
                 Tube = new DtoTube2()
                 {
                     Code = tubeGrid.Code
                 },
                 ReceivedDt = tubeGrid.ReceivedDt
             };
             tubeGrid.ConcreteCode = OrderService.AddConcreteTube(dtoConcreteTube);
         }
         else
         {
             var dtoConcreteTube = new DtoConcreteTube()
             {
                 Code = tubeGrid.ConcreteCode,
                 Tube = new DtoTube2()
                 {
                     Code = tubeGrid.Code
                 },
                 ReceivedDt = tubeGrid.ReceivedDt
             };
             OrderService.EditConcreteTube(dtoConcreteTube);
         }
     }
     return tubeGrids;
 }
Exemplo n.º 4
0
 public BindingList<TubeForGrid> AddConcreteTube(BindingList<TubeForGrid> tubeGrids, string orderNumber)
 {
     foreach (var tubeGrid in tubeGrids)
     {
         var dtoConcreteTube = new DtoConcreteTube()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Tube = new DtoTube2()
             {
                 Code = tubeGrid.Code
             },
             ReceivedDt = tubeGrid.ReceivedDt
         };
         tubeGrid.ConcreteCode = OrderService.AddConcreteTube(dtoConcreteTube);
     }
     return tubeGrids;
 }