コード例 #1
0
 public ActionResult ProfileEdit(CLIENTS data)
 {
     db.Entry(data).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
     ViewBag.Message = "Вы успешно изменили свои данные.";
     return(View());
 }
コード例 #2
0
        public IHttpActionResult PutCustomer(int id, Customer customer)
        {
            if (id != customer.Id)
            {
                return(BadRequest());
            }

            db.Entry(customer).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CustomerExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "nombre_Hotel,descripcion_Hotel,sobreNosotros_Hotel,latitud_Hotel,longitud_Hotel,comoLlegar_Hotel,telefono_Hotel,aptoPostal_Hotel,email_Hotel")] Hotel hotel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hotel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(hotel));
 }
コード例 #4
0
 public void Update(Account item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
コード例 #5
0
 public void Update(RoomType item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
コード例 #6
0
 public void Update(Service item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
コード例 #7
0
 public void Update(CheckIn item)
 {
     db.Entry(item).State = EntityState.Modified;
 }