コード例 #1
0
        public ActionResult update(otherCar loc1)
        {
            int locid;

            locid = loc1.id;
            //locid = 28;
            ass.update(loc1, locid);
            return(RedirectToAction("configuration"));
        }
コード例 #2
0
        public ViewResult update(int lid)
        {
            CarsContext cont;   //update

            cont = ass.getdbcont();
            otherCar oc1 = cont.otherCars.ToList <otherCar>().Find(o => o.id == lid);

            if (oc1 == null)
            {
                oc1 = new otherCar();
                ass.init_car(oc1);
            }

            return(View("Edit", oc1));
        }