Example #1
0
        public void AddProductTest(ArchivedProductTestW aproductTest)
        {
            aproductTest.Id = Guid.NewGuid();
            Db.ArchivedProductTests.Add(aproductTest.ToBase());

            Db.SaveChanges();
        }
        public ActionResult EditProductTest(ArchivedProductTestW aproductTest)
        {
            if (ModelState.IsValid)
            {
                _rep.EditProductTest(aproductTest);
                return(RedirectToAction("ProductTestsIndex", new { aproductId = aproductTest.ArchivedProductId }));
            }

            return(View(aproductTest));
        }
Example #3
0
        public void EditProductTest(ArchivedProductTestW aproductTest)
        {
            var productTest = Db.ArchivedProductTests.Single(pt => pt.Id == aproductTest.Id);

            productTest.ArchivedProductId     = aproductTest.ArchivedProductId;
            productTest.TestCategory          = aproductTest.TestCategory;
            productTest.TestMethods           = aproductTest.TestMethods;
            productTest.TestName              = aproductTest.TestName;
            productTest.TestTemperature       = aproductTest.TestTemperature;
            productTest.TestUnitName          = aproductTest.TestUnitName;
            productTest.TestAcredetationLevel = aproductTest.TestAcredetationLevel;
            productTest.TestType              = aproductTest.TestType;
            productTest.TestTypeShortName     = aproductTest.TestTypeShortName;
            productTest.MethodValue           = aproductTest.MethodValue;
            productTest.Remark = aproductTest.Remark;

            Db.SaveChanges();
        }