Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_LK_FarmerProduction tbl_LK_FarmerProduction = db.tbl_LK_FarmerProduction.Find(id);

            db.tbl_LK_FarmerProduction.Remove(tbl_LK_FarmerProduction);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        // GET: FarmerProduction1/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_FarmerProduction tbl_LK_FarmerProduction = db.tbl_LK_FarmerProduction.Find(id);

            if (tbl_LK_FarmerProduction == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_LK_FarmerProduction));
        }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "FarmerProductionID,FarmerID,Quantity_10_11,Yield,ProductionSeasonID,YearID,dateCreated,StateID,CIGID,FarmerBenefitID")] tbl_LK_FarmerProduction tbl_LK_FarmerProduction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_LK_FarmerProduction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FarmerID           = new SelectList(db.tbl_LK_Farmer, "FarmerID", "FarmerName", tbl_LK_FarmerProduction.FarmerID);
     ViewBag.CIGID              = new SelectList(db.tbl_LK_FarmerCIG, "CIGID", "CIGName", tbl_LK_FarmerProduction.CIGID);
     ViewBag.ProductionSeasonID = new SelectList(db.tbl_LK_FarmerProductionSeason, "ProductionSeasonID", "ProductionSeasonName", tbl_LK_FarmerProduction.ProductionSeasonID);
     ViewBag.StateID            = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_FarmerProduction.StateID);
     ViewBag.YearID             = new SelectList(db.tbl_LK_Year, "YearID", "YearID", tbl_LK_FarmerProduction.YearID);
     return(View(tbl_LK_FarmerProduction));
 }
Exemplo n.º 4
0
        // GET: FarmerProduction1/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_FarmerProduction tbl_LK_FarmerProduction = db.tbl_LK_FarmerProduction.Find(id);

            if (tbl_LK_FarmerProduction == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FarmerID           = new SelectList(db.tbl_LK_Farmer, "FarmerID", "FarmerName", tbl_LK_FarmerProduction.FarmerID);
            ViewBag.CIGID              = new SelectList(db.tbl_LK_FarmerCIG, "CIGID", "CIGName", tbl_LK_FarmerProduction.CIGID);
            ViewBag.ProductionSeasonID = new SelectList(db.tbl_LK_FarmerProductionSeason, "ProductionSeasonID", "ProductionSeasonName", tbl_LK_FarmerProduction.ProductionSeasonID);
            ViewBag.StateID            = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_FarmerProduction.StateID);
            ViewBag.YearID             = new SelectList(db.tbl_LK_Year, "YearID", "YearID", tbl_LK_FarmerProduction.YearID);
            return(View(tbl_LK_FarmerProduction));
        }