Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MasterPurchaseRates masterPurchaseRates = db.masterPurchaseRates.Find(id);

            db.masterPurchaseRates.Remove(masterPurchaseRates);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MasterPurchaseRates masterPurchaseRates = db.masterPurchaseRates.Find(id);

            if (masterPurchaseRates == null)
            {
                return(HttpNotFound());
            }
            return(View(masterPurchaseRates));
        }
Esempio n. 3
0
 public ActionResult Edit(MasterPurchaseRates masterPurchaseRates)
 {
     if (ModelState.IsValid)
     {
         db.Entry(masterPurchaseRates).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Product1  = new SelectList(db.masterProducts, "ProductID", "ProductName");
     ViewBag.Size1     = new SelectList(db.masterSizes, "SizeID", "Size");
     ViewBag.Supplier1 = new SelectList(db.masterSuppliers, "SupplierID", "Name");
     ViewBag.Unit1     = new SelectList(db.masterUnits, "UnitID", "Unit");
     ViewBag.Vendor1   = new SelectList(db.masterVendors, "VendorID", "Name");
     return(View(masterPurchaseRates));
 }
Esempio n. 4
0
        // GET: MasterPurchaseRates/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MasterPurchaseRates masterPurchaseRates = db.masterPurchaseRates.Find(id);

            if (masterPurchaseRates == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Product1  = new SelectList(db.masterProducts, "ProductID", "ProductName");
            ViewBag.Size1     = new SelectList(db.masterSizes, "SizeID", "Size");
            ViewBag.Supplier1 = new SelectList(db.masterSuppliers, "SupplierID", "Name");
            ViewBag.Unit1     = new SelectList(db.masterUnits, "UnitID", "Unit");
            ViewBag.Vendor1   = new SelectList(db.masterVendors, "VendorID", "Name");
            return(View(masterPurchaseRates));
        }