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

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

            if (tbl_LK_FarmerBenefit == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_LK_FarmerBenefit));
        }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "FarmerBenefitID,FarmerID,Amount,ProductionSeasonID,dateIssued,StateID,CIGID,Remark")] tbl_LK_FarmerBenefit tbl_LK_FarmerBenefit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_LK_FarmerBenefit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FarmerID           = new SelectList(db.tbl_LK_Farmer, "FarmerID", "FarmerName", tbl_LK_FarmerBenefit.FarmerID);
     ViewBag.CIGID              = new SelectList(db.tbl_LK_FarmerCIG, "CIGID", "CIGName", tbl_LK_FarmerBenefit.CIGID);
     ViewBag.ProductionSeasonID = new SelectList(db.tbl_LK_FarmerProductionSeason, "ProductionSeasonID", "ProductionSeasonName", tbl_LK_FarmerBenefit.ProductionSeasonID);
     ViewBag.StateID            = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_FarmerBenefit.StateID);
     return(View(tbl_LK_FarmerBenefit));
 }
Esempio n. 4
0
        // GET: FarmerBenefit1/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_FarmerBenefit tbl_LK_FarmerBenefit = db.tbl_LK_FarmerBenefit.Find(id);

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