示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Customer_SubCatageory customer_SubCatageory = db.Customer_SubCatageory.Find(id);

            db.Customer_SubCatageory.Remove(customer_SubCatageory);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,CustomerID,SubCatageoryId")] Customer_SubCatageory customer_SubCatageory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer_SubCatageory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SubCatageoryId = new SelectList(db.BusinessSubCatageories, "Id", "Name", customer_SubCatageory.SubCatageoryId);
     ViewBag.CustomerID     = new SelectList(db.Customers, "Id", "Id", customer_SubCatageory.CustomerID);
     return(View(customer_SubCatageory));
 }
示例#3
0
        // GET: Customer_SubCatageory/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Customer_SubCatageory customer_SubCatageory = db.Customer_SubCatageory.Find(id);

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

            if (customer_SubCatageory == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SubCatageoryId = new SelectList(db.BusinessSubCatageories, "Id", "Name", customer_SubCatageory.SubCatageoryId);
            ViewBag.CustomerID     = new SelectList(db.Customers, "Id", "Id", customer_SubCatageory.CustomerID);
            return(View(customer_SubCatageory));
        }