public ActionResult DeleteConfirmed(int id)
        {
            CoopMember coopMember = db.CoopMembers.Find(id);

            db.CoopMembers.Remove(coopMember);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name,Contact1,Contact2,Contact3,Email,Details,Status")] CoopMember coopMember)
 {
     if (ModelState.IsValid)
     {
         db.Entry(coopMember).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(coopMember));
 }
        public ActionResult Create([Bind(Include = "Id,Name,Contact1,Contact2,Contact3,Email,Details,Status")] CoopMember coopMember)
        {
            if (ModelState.IsValid)
            {
                db.CoopMembers.Add(coopMember);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(coopMember));
        }
        // GET: CoopMembers/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CoopMember coopMember = db.CoopMembers.Find(id);

            if (coopMember == null)
            {
                return(HttpNotFound());
            }
            return(View(coopMember));
        }