Example #1
0
        public ActionResult Temprature()
        {
            tempretureClass tempreture = new tempretureClass();

            tempreture.temprutureChecks = db.temprutureChecks.ToList();

            return(View(tempreture));
        }
Example #2
0
 public ActionResult Addtemp(tempretureClass temp)
 {
     try
     {
         temp.tempruture.date_time = DateTime.Now;
         db.temprutureChecks.Add(temp.tempruture);
         db.SaveChanges();
         return(RedirectToAction("Temprature"));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Addtemp"));
     }
 }
Example #3
0
        public ActionResult Addtemp()
        {
            tempretureClass tempreture = new tempretureClass();

            return(View(tempreture));
        }