Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            VW_CustomerReport vW_CustomerReport = db.VW_CustomerReport.Find(id);

            db.VW_CustomerReport.Remove(vW_CustomerReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "客戶名稱,contactCounts,bankCounts,Id")] VW_CustomerReport vW_CustomerReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vW_CustomerReport).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(vW_CustomerReport));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "客戶名稱,contactCounts,bankCounts,Id")] VW_CustomerReport vW_CustomerReport)
        {
            if (ModelState.IsValid)
            {
                db.VW_CustomerReport.Add(vW_CustomerReport);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(vW_CustomerReport));
        }
Exemplo n.º 4
0
        // GET: CustomerReport/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VW_CustomerReport vW_CustomerReport = db.VW_CustomerReport.Find(id);

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