Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SupplierPoDtl supplierPoDtl = db.SupplierPoDtls.Find(id);

            db.SupplierPoDtls.Remove(supplierPoDtl);
            db.SaveChanges();
            return(RedirectToAction("Index", "SupplierPoDtls", new { hdrId = supplierPoDtl.SupplierPoHdrId }));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,SupplierPoHdrId,Remarks,Amount,JobServicesId")] SupplierPoDtl supplierPoDtl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplierPoDtl).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", new { hdrId = supplierPoDtl.SupplierPoHdrId }));
     }
     ViewBag.SupplierPoHdrId = new SelectList(db.SupplierPoHdrs, "Id", "Remarks", supplierPoDtl.SupplierPoHdrId);
     ViewBag.JobServicesId   = new SelectList(db.JobServices, "Id", "Particulars", supplierPoDtl.JobServicesId);
     return(View(supplierPoDtl));
 }
Example #3
0
        // GET: SupplierPoDtls/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SupplierPoDtl supplierPoDtl = db.SupplierPoDtls.Find(id);

            if (supplierPoDtl == null)
            {
                return(HttpNotFound());
            }
            return(View(supplierPoDtl));
        }
Example #4
0
        // GET: SupplierPoDtls/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SupplierPoDtl supplierPoDtl = db.SupplierPoDtls.Find(id);

            if (supplierPoDtl == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SupplierPoHdrId = new SelectList(db.SupplierPoHdrs, "Id", "Remarks", supplierPoDtl.SupplierPoHdrId);
            ViewBag.JobServicesId   = new SelectList(db.JobServices, "Id", "Particulars", supplierPoDtl.JobServicesId);
            return(View(supplierPoDtl));
        }