public bool Delete(int entityId) { var status = _repo.Find(x => x.Id == entityId && x.Deleted == false); if (status != null) { status.Deleted = true; return(_repo.Update(status)); } return(false); }
public ActionResult Create(Enquiry enquiry) { if (ModelState.IsValid) { enquiry.StatusId = statusRepository.Find(Convert.ToInt32(Status.Await_Appoint)).StatusId; enquiryRepository.InsertOrUpdate(enquiry); enquiryRepository.Save(); var mailer = new EnquiryMailer(); var msg = mailer.Submitted(enquiry.Contact.ContactEmail, enquiry.EnquiryID); msg.Send(); return(RedirectToAction("Index")); } else { ViewBag.PossibleContacts = contactRepository.All; ViewBag.PossibleAddresses = addressRepository.All; ViewBag.PossibleDesignerContacts = contactRepository.All; return(View()); } }
// // GET: /Status/Details/5 public ViewResult Details(int id) { return(View(statusRepository.Find(id))); }