public Organization Update(Organization item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public Family Update(Family item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public User Update(User item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public Department Update(Department item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public Offering Update(Offering item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public Business Update(Business item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public Enterprise Update(Enterprise item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); return(_context.Entry(item).Entity); }
public ActionResult Edit(Enterprise enterprise, int id) { if (ModelState.IsValid) { db.Entry(enterprise).State = EntityState.Modified; db.Entry(enterprise).Property(e => e.DateCreated).IsModified = false; db.SaveChanges(); return(RedirectToAction("Edit")); } return(View(enterprise)); }
public async Task <Student> UpdateAsync(Student student) { _context.Entry(student).State = EntityState.Modified; await _context.SaveChangesAsync(); return(student); }
public ActionResult Edit(Enterprises enterprise) { if (Request.IsAjaxRequest()) { db.Entry(enterprise).State = EntityState.Modified; db.SaveChanges(); return(Content("<b>Дані збережені о <b>" + DateTime.Now.ToLongTimeString())); } return(RedirectToAction("List")); }
public ActionResult Edit([Bind(Include = "ID,Name,DateModified,DateCreated")] Parent parent) { if (ModelState.IsValid) { db.Entry(parent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(parent)); }
public ActionResult Edit([Bind(Include = "ID,Name,Description,EnterpriseID")] Competence competence) { if (ModelState.IsValid) { db.Entry(competence).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EnterpriseID = new SelectList(db.Enterprises, "ID", "Name", competence.EnterpriseID); return(View(competence)); }
public ActionResult Edit([Bind(Include = "ID,Name,Surname,Email,PhoneNr,RegistrationDate,EnterpriseID")] Employee employee) { if (ModelState.IsValid) { int?result = ToNullableInt32(Request.Form["CompetenceID"]); if (result != db.CompetencesRatings.Where(c => c.EmployeeID == employee.ID).First().CompetenceID) { var competenceRating = new CompetenceRating { CompetenceID = result, EmployeeID = employee.ID }; db.CompetencesRatings.Add(competenceRating); } db.Entry(employee).State = EntityState.Modified; db.Entry(employee).Property(e => e.RegistrationDate).IsModified = false; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EnterpriseID = new SelectList(db.Enterprises, "ID", "Name", employee.EnterpriseID); return(View(employee)); }
public ActionResult Edit([Bind(Include = "ID,Name,DateModified,DateCreated")] Client client) { if (ModelState.IsValid) { client.DateModified = DateTime.Now; client.DateCreated = DateTime.Now; db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Edit([Bind(Include = "ID,ClientID,ParentID,AccessCode,IsAndroid,ApkName,Route,Enabled,DateModified,DateCreated,DownloadCount")] Enterprise enterprise) { if (ModelState.IsValid) { db.Entry(enterprise).State = EntityState.Modified; enterprise.DateModified = DateTime.Now; enterprise.DateCreated = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ClientID = new SelectList(db.Clients, "ID", "Name", enterprise.ClientID); ViewBag.ParentID = new SelectList(db.Parents, "ID", "Name", enterprise.ParentID); return(View(enterprise)); }
public void Update(Employee item) { db.Entry(item).State = EntityState.Modified; }
public void Update(T entity) { _context.Entry(entity).State = EntityState.Modified; _context.SaveChanges(); }
public void Update(OrderProduct item) { db.Entry(item).State = EntityState.Modified; }