Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            vw_CustomerDetailsCount vw_CustomerDetailsCount = db.vw_CustomerDetailsCount.Find(id);

            db.vw_CustomerDetailsCount.Remove(vw_CustomerDetailsCount);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "CustomerID,Customer,CountAccount,CountContact")] vw_CustomerDetailsCount vw_CustomerDetailsCount)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vw_CustomerDetailsCount).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(vw_CustomerDetailsCount));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "CustomerID,Customer,CountAccount,CountContact")] vw_CustomerDetailsCount vw_CustomerDetailsCount)
        {
            if (ModelState.IsValid)
            {
                db.vw_CustomerDetailsCount.Add(vw_CustomerDetailsCount);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(vw_CustomerDetailsCount));
        }
Пример #4
0
        // GET: vw_CustomerDetailsCount/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            vw_CustomerDetailsCount vw_CustomerDetailsCount = db.vw_CustomerDetailsCount.Find(id);

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