Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            cOrganisation cOrganisation = db.Organisations.Find(id);

            db.Entities.Remove(cOrganisation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,registeredName,tradingName,keyClient,organisationType,Address1,Address2,Address3")] cOrganisation cOrganisation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cOrganisation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID = new SelectList(db.CDD_Details, "ID", "CDDContact_Name", cOrganisation.ID);
     return(View(cOrganisation));
 }
Example #3
0
        // GET: cOrganisation/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            cOrganisation cOrganisation = db.Organisations.Find(id);

            if (cOrganisation == null)
            {
                return(HttpNotFound());
            }
            return(View(cOrganisation));
        }
Example #4
0
        // GET: cOrganisation/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            cOrganisation cOrganisation = db.Organisations.Find(id);

            if (cOrganisation == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID = new SelectList(db.CDD_Details, "ID", "CDDContact_Name", cOrganisation.ID);
            return(View(cOrganisation));
        }