Exemple #1
0
        public DtoConcreteTest GetConcreteTestByCode(string code)
        {
            var concreteTest    = ConcreteTestMethods.Instance.GetConcreteTestByCode(code);
            var dtoConcreteTest = new DtoConcreteTest()
            {
                Id = concreteTest.Id,
            };

            return(dtoConcreteTest);
        }
Exemple #2
0
 public string AddConcreteTest(DtoConcreteTest dtoConcreteTest)
 {
     var concreteTest = new ConcreteTest()
         {
             Order = new Order
             {
                 Id = OrderMethods.Instance.GetOrderByNumber(dtoConcreteTest.Order.Number).Id
             },
             Test = new Test()
             {
                 Id = TestMethods.Instance.GetTestByCode(dtoConcreteTest.Test.Code).Id
             }
         };
      return   ConcreteTestMethods.Instance.InsertConcreteTest(concreteTest);
 }
Exemple #3
0
        public string AddConcreteTest(DtoConcreteTest dtoConcreteTest)
        {
            var concreteTest = new ConcreteTest()
            {
                Order = new Order
                {
                    Id = OrderMethods.Instance.GetOrderByNumber(dtoConcreteTest.Order.Number).Id
                },
                Test = new Test()
                {
                    Id = TestMethods.Instance.GetTestByCode(dtoConcreteTest.Test.Code).Id
                }
            };

            return(ConcreteTestMethods.Instance.InsertConcreteTest(concreteTest));
        }
Exemple #4
0
        public bool EditConcreteTest(DtoConcreteTest dtoConcreteTest)
        {
            var concreteTest = new ConcreteTest()
            {
                Id   = ConcreteTestMethods.Instance.GetConcreteTestByCode(dtoConcreteTest.Code).Id,
                Code = dtoConcreteTest.Code,
                Test = new Test()
                {
                    Id = TestMethods.Instance.GetTestByCode(dtoConcreteTest.Test.Code).Id,
                },
                Order = new Order()
                {
                    Id = ConcreteTestMethods.Instance.GetConcreteTestByCode(dtoConcreteTest.Code).Order.Id,
                }
            };

            return(ConcreteTestMethods.Instance.UpdateConcreteTest(concreteTest));
        }
Exemple #5
0
 public DtoConcreteTest GetConcreteTestByCode(string code)
 {
     var concreteTest =  ConcreteTestMethods.Instance.GetConcreteTestByCode(code);
     var dtoConcreteTest = new DtoConcreteTest()
     {
         Id = concreteTest.Id,
     };
     return dtoConcreteTest;
 }
Exemple #6
0
 public bool EditConcreteTest(DtoConcreteTest dtoConcreteTest)
 {
     var concreteTest = new ConcreteTest()
     {
         Id = ConcreteTestMethods.Instance.GetConcreteTestByCode(dtoConcreteTest.Code).Id,
         Code = dtoConcreteTest.Code,
         Test = new Test()
         {
             Id = TestMethods.Instance.GetTestByCode(dtoConcreteTest.Test.Code).Id,
         },
         Order = new Order()
         {
             Id = ConcreteTestMethods.Instance.GetConcreteTestByCode(dtoConcreteTest.Code).Order.Id,
         }
     };
     return ConcreteTestMethods.Instance.UpdateConcreteTest(concreteTest);
 }