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); } }
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; } }
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; } }
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); }
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); } }
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); } }
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); }
public void DeleteConcreteTest(string code) { var concreteTest = new ConcreteTest() { Code = code }; ConcreteTestMethods.Instance.DeleteConcreteTest(concreteTest); }
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; } }