Beispiel #1
0
 public ActionResult DeleteConfirmed(Guid id)
 {
     DailyProductionReport dailyProductionReport = db.DailyProductionReports.Find(id);
     db.DailyProductionReports.Remove(dailyProductionReport);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
Beispiel #2
0
 // GET: Production/DailyProductionReports/Details/5
 public ActionResult Details(Guid? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     DailyProductionReport dailyProductionReport = db.DailyProductionReports.Find(id);
     if (dailyProductionReport == null)
     {
         return HttpNotFound();
     }
     return View(dailyProductionReport);
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "Id,ProductionLineId,ProductId,DateOfProduction,DateOfReport,AmountOfAcceptedProduct,AmountOfUnacceptedProduct,WeightInUnit,OrdinaryMaterialConsumedAmount,GranuleMaterialConsumedAmount,BlackMasterbatchConsumedAmount,YellowMasterbatchConsumedAmount,RecycledConsumedAmount,AllMaterialsConsumedAmountInKilo,WastageProducedInKilo")] DailyProductionReport dailyProductionReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dailyProductionReport).State = EntityState.Modified;
         dailyProductionReport.DateOfProduction = FormatDate(dailyProductionReport.DateOfProduction);
         dailyProductionReport.DateOfReport = FormatDate(dailyProductionReport.DateOfReport);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ProductId = new SelectList(db.Products, "Id", "Title", dailyProductionReport.ProductId);
     ViewBag.ProductionLineId = new SelectList(db.ProductionLines, "Id", "Description", dailyProductionReport.ProductionLineId);
     return View(dailyProductionReport);
 }
Beispiel #4
0
 // GET: Production/DailyProductionReports/Edit/5
 public ActionResult Edit(Guid? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     DailyProductionReport dailyProductionReport = db.DailyProductionReports.Find(id);
     if (dailyProductionReport == null)
     {
         return HttpNotFound();
     }
     ViewBag.ProductId = new SelectList(db.Products, "Id", "Title", dailyProductionReport.ProductId);
     ViewBag.ProductionLineId = new SelectList(db.ProductionLines, "Id", "Description", dailyProductionReport.ProductionLineId);
     return View(dailyProductionReport);
 }