Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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());
     }
 }
Ejemplo n.º 3
0
        //
        // GET: /Status/Details/5

        public ViewResult Details(int id)
        {
            return(View(statusRepository.Find(id)));
        }