예제 #1
0
        public bool UpdateConcreteTest(ConcreteTest test)
        {
            var result = UpdateEntity <ConcreteTest>(test);

            if (result)
            {
                log.Info(string.Format("Concrete test {0} changed", test.Code));
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
 public string InsertConcreteTest(ConcreteTest test)
 {
     test.Code = GenerateConcreteTestNumber();
     var result = InsertEntity<ConcreteTest>(test);
     if (result)
     {
         log.Info(string.Format("Concrete test {0} saved",test.Code));
         return test.Code;
     }
     else
     {
         return string.Empty;
     }
 }
예제 #3
0
 public bool DeleteConcreteTest(ConcreteTest test)
 {
     test.Id = ConcreteTestMethods.Instance.GetConcreteTestByCode(test.Code).Id;
     var result = DeleteEntity<ConcreteTest>(test);
     if (result)
     {
         log.Info(string.Format("Concrete test {0} deleted", test.Code));
         return true;
     }
     else
     {
         return false;
     }
 }
예제 #4
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);
 }
예제 #5
0
        public bool DeleteConcreteTest(ConcreteTest test)
        {
            test.Id = ConcreteTestMethods.Instance.GetConcreteTestByCode(test.Code).Id;
            var result = DeleteEntity <ConcreteTest>(test);

            if (result)
            {
                log.Info(string.Format("Concrete test {0} deleted", test.Code));
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #6
0
        public string InsertConcreteTest(ConcreteTest test)
        {
            test.Code = GenerateConcreteTestNumber();
            var result = InsertEntity <ConcreteTest>(test);

            if (result)
            {
                log.Info(string.Format("Concrete test {0} saved", test.Code));
                return(test.Code);
            }
            else
            {
                return(string.Empty);
            }
        }
예제 #7
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);
 }
예제 #8
0
 public void DeleteConcreteTest(string code)
 {
     var concreteTest = new ConcreteTest()
     {
         Code = code
     };
     ConcreteTestMethods.Instance.DeleteConcreteTest(concreteTest);
 }
예제 #9
0
 public bool UpdateConcreteTest(ConcreteTest test)
 {
     var result = UpdateEntity<ConcreteTest>(test);
        if (result)
        {
        log.Info(string.Format("Concrete test {0} changed", test.Code));
        return true;
        }
        else
        {
        return false;
        }
 }