public DtoConcreteSpecimen GetConcreteSpecimenByCode(string code) { var concreteSpecimen = ConcreteSpecimenMethods.Instance.GetConcreteSpecimenByCode(code); var dtoConcreteSpecimen = new DtoConcreteSpecimen() { Id = concreteSpecimen.Id, }; return(dtoConcreteSpecimen); }
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)); }
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)); }