public void UpdateWeather(Models.Models.WeatherForecast weatherForecast)
        {
            var updateWeather = mapper.Map <Models.DBContexts.WeatherForecast>(weatherForecast);

            _trackerDbContext.Entry(updateWeather).State = EntityState.Modified;
            Save();
        }
Beispiel #2
0
        public ActionResult Update(BangTheoDoiToCat bangTheoDoiToCat)
        {
            if (ModelState.IsValid)
            {
                _context.Entry(bangTheoDoiToCat).State = EntityState.Modified;
                _context.SaveChanges();
            }

            return(Json(bangTheoDoiToCat, JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "MaChuyen,MaHang,SLKeHoach,ThucHien,LuyKeThucHien,DenBaoCapBTP")] BangTheoDoiToCat bangTheoDoiToCat)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bangTheoDoiToCat).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaHang = new SelectList(db.BangTenMatHangs, "MaHang", "TenHang", bangTheoDoiToCat.MaHang);
     return(View(bangTheoDoiToCat));
 }