예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            StockMasterMainList_tbl stockMasterMainList_tbl = db.StockMasterMainList_tbl.Find(id);

            db.StockMasterMainList_tbl.Remove(stockMasterMainList_tbl);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "MasterInfoId,StockMasterId,CompanyId,StorageAmount,ReleaseAmount,AvailableStorageAmount,IsApprove")] StockMasterMainList_tbl stockMasterMainList_tbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stockMasterMainList_tbl).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CompanyId     = new SelectList(db.StorageCompany_tbl, "StorageCompanyId", "CompanyName", stockMasterMainList_tbl.CompanyId);
     ViewBag.StockMasterId = new SelectList(db.StockMasterRecordCrops_tbl, "StockMasterRecordId", "InvoiceNo", stockMasterMainList_tbl.StockMasterId);
     return(View(stockMasterMainList_tbl));
 }
예제 #3
0
        // GET: StockMasterMainList_tbl/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StockMasterMainList_tbl stockMasterMainList_tbl = db.StockMasterMainList_tbl.Find(id);

            if (stockMasterMainList_tbl == null)
            {
                return(HttpNotFound());
            }
            return(View(stockMasterMainList_tbl));
        }
예제 #4
0
        // GET: StockMasterMainList_tbl/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StockMasterMainList_tbl stockMasterMainList_tbl = db.StockMasterMainList_tbl.Find(id);

            if (stockMasterMainList_tbl == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CompanyId     = new SelectList(db.StorageCompany_tbl, "StorageCompanyId", "CompanyName", stockMasterMainList_tbl.CompanyId);
            ViewBag.StockMasterId = new SelectList(db.StockMasterRecordCrops_tbl, "StockMasterRecordId", "InvoiceNo", stockMasterMainList_tbl.StockMasterId);
            return(View(stockMasterMainList_tbl));
        }