Ejemplo n.º 1
0
 public string AddConcreteSpecimen(DtoConcreteSpecimen dtoConcreteSpecimen)
 {
     var concreteSpecimen = new ConcreteSpecimen()
     {
         Order = new Order
         {
             Id = OrderMethods.Instance.GetOrderByNumber(dtoConcreteSpecimen.Order.Number).Id
         },
         Specimen = new Specimen()
         {
             Id = SpecimenMethods.Instance.GetSpecimenByCode(dtoConcreteSpecimen.Specimen.Code).Id
         },
         Volume = dtoConcreteSpecimen.Volume,
         CollectedDt = dtoConcreteSpecimen.CollectedDt
     };
     return ConcreteSpecimenMethods.Instance.InsertConcreteSpecimen(concreteSpecimen);
 }
Ejemplo n.º 2
0
 public BindingList <SpecimenForGrid> AddConcreteSpecimen(BindingList <SpecimenForGrid> specimenGrids, string orderNumber)
 {
     foreach (var specimenGrid in specimenGrids)
     {
         var dtoConcreteSpecimen = new DtoConcreteSpecimen()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Specimen = new DtoSpecimen2()
             {
                 Code = specimenGrid.Code
             },
             CollectedDt = specimenGrid.CollectedDt,
             Volume      = specimenGrid.Volume
         };
         specimenGrid.ConcreteCode = OrderService.AddConcreteSpecimen(dtoConcreteSpecimen);
     }
     return(specimenGrids);
 }
Ejemplo n.º 3
0
 public DtoConcreteSpecimen GetConcreteSpecimenByCode(string code)
 {
     var concreteSpecimen = ConcreteSpecimenMethods.Instance.GetConcreteSpecimenByCode(code);
     var dtoConcreteSpecimen = new DtoConcreteSpecimen()
     {
         Id = concreteSpecimen.Id,
     };
     return dtoConcreteSpecimen;
 }
Ejemplo n.º 4
0
        public bool EditConcreteSpecimen(DtoConcreteSpecimen dtoConcreteSpecimen)
        {
            var concreteSpecimen = new ConcreteSpecimen()
            {

                Id = ConcreteSpecimenMethods.Instance.GetConcreteSpecimenByCode(dtoConcreteSpecimen.Code).Id,
                Code = dtoConcreteSpecimen.Code,
                Specimen = new Specimen()
                {
                    Id = SpecimenMethods.Instance.GetSpecimenByCode(dtoConcreteSpecimen.Specimen.Code).Id
                },
                Order = new Order()
                {
                    Id = ConcreteSpecimenMethods.Instance.GetConcreteSpecimenByCode(dtoConcreteSpecimen.Code).Order.Id
                },
                Volume = dtoConcreteSpecimen.Volume,
                CollectedDt = dtoConcreteSpecimen.CollectedDt
            };
            return ConcreteSpecimenMethods.Instance.UpdateConcreteSpecimen(concreteSpecimen);
        }
Ejemplo n.º 5
0
 public BindingList<SpecimenForGrid> AddConcreteSpecimen(BindingList<SpecimenForGrid> specimenGrids, string orderNumber)
 {
     foreach (var specimenGrid in specimenGrids)
     {
         var dtoConcreteSpecimen = new DtoConcreteSpecimen()
         {
             Order = new DtoOrder1()
             {
                 Number = orderNumber
             },
             Specimen = new DtoSpecimen2()
             {
                 Code = specimenGrid.Code
             },
             CollectedDt = specimenGrid.CollectedDt,
             Volume = specimenGrid.Volume
         };
         specimenGrid.ConcreteCode = OrderService.AddConcreteSpecimen(dtoConcreteSpecimen);
     }
     return specimenGrids;
 }