示例#1
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         UserInputs60Hz userInputs60Hz = db.userInputs60Hz.Find(id);
         db.userInputs60Hz.Remove(userInputs60Hz);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         DataLink.LogError(e);
         throw;
     }
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,TransSize,Impedance,SCC,FaultClearing,Voltage,FreeAir,IPAddress")] UserInputs60Hz userInputs60Hz)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(userInputs60Hz).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View(userInputs60Hz));
     }
     catch (Exception e)
     {
         DataLink.LogError(e);
         throw;
     }
 }
示例#3
0
        // ------------------------------- These are the important actionresults//

        // GET: UserInputs60Hz/Details/5
        public ActionResult Details(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }
                UserInputs60Hz userInputs60Hz = db.userInputs60Hz.Find(id);
                if (userInputs60Hz == null)
                {
                    return(HttpNotFound());
                }
                return(View(userInputs60Hz));
            }
            catch (Exception e)
            {
                DataLink.LogError(e);
                throw;
            }
        }