public ActionResult Create(PurchaseTest purchasetest)
        {
            if (ModelState.IsValid)
            {
                purchasetest.ModifyDate = DateTime.Now;
                context.PurchaseTests.Add(purchasetest);
                context.SaveChanges();
                return RedirectToAction("Index");  
            }

            return View(purchasetest);
        }
 public ActionResult Edit(PurchaseTest purchasetest)
 {
     if (ModelState.IsValid)
     {
         purchasetest.ModifyDate = DateTime.Now;
         context.Entry(purchasetest).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(purchasetest);
 }