public ActionResult Edit([Bind(Include = "SourcingTypeId,SourcingTypeName,IsDeleted,DeletedDate")] SourcingType sourcingType) { if (ModelState.IsValid) { sourcingType.SourcingTypeName = sourcingType.SourcingTypeName.ToUpper(); sourcingType.IsDeleted = Convert.ToBoolean("FALSE"); db.Entry(sourcingType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sourcingType)); }
// GET: SourcingTypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SourcingType sourcingType = db.sourcingTypes.Find(id); if (sourcingType == null) { return(HttpNotFound()); } return(View(sourcingType)); }