public void Edit(entity_note entity) { _unitOfWork.EntityNoteRepository.Update(entity); _unitOfWork.Save(); _unitOfWork.Commit(); }
public ActionResult Create(entity_note entity_note) { if (ModelState.IsValid) { entity_note.etn_created_by = User.Identity.GetUserId(); entity_note.etn_created_by_name = loggedInUser.FullName; entity_note.etn_created_date = DateTime.Now.ToEST(); _entityNoteService.Create(entity_note); return(Json(new { success = true })); } else { return(Json(new { success = false, data = string.Join("<br/>", this.GetModalErrors().Values) })); } }
// GET: entity_note/Edit/5 public ActionResult Edit(int?id) { ViewBag.etn_ntt_key = _entityNoteService.GetAll() .Select(m => new SelectListItem { Text = m.ucd_title, Value = m.ucd_key.ToString() }); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } entity_note entity_note = _entityNoteService.GetDetails(id.Value); if (entity_note == null) { return(HttpNotFound()); } return(PartialView(entity_note)); }
public void Create(entity_note entity) { _unitOfWork.EntityNoteRepository.Insert(entity); _unitOfWork.Save(); _unitOfWork.Commit(); }