public ActionResult DeleteConfirmed(int id)
        {
            tbl_LK_FarmerCIG tbl_LK_FarmerCIG = db.tbl_LK_FarmerCIG.Find(id);

            db.tbl_LK_FarmerCIG.Remove(tbl_LK_FarmerCIG);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "CIGID,CIGName,StateID,Amount,YearID,dateIssued,GroupTypeID")] tbl_LK_FarmerCIG tbl_LK_FarmerCIG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_LK_FarmerCIG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GroupTypeID = new SelectList(db.tbl_LK_Group_type, "GroupTypeID", "GroupTypeName", tbl_LK_FarmerCIG.GroupTypeID);
     ViewBag.StateID     = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_FarmerCIG.StateID);
     ViewBag.YearID      = new SelectList(db.tbl_LK_Year, "YearID", "YearID", tbl_LK_FarmerCIG.YearID);
     return(View(tbl_LK_FarmerCIG));
 }
        // GET: FarmerCIG/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_FarmerCIG tbl_LK_FarmerCIG = db.tbl_LK_FarmerCIG.Find(id);

            if (tbl_LK_FarmerCIG == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_LK_FarmerCIG));
        }
        // GET: FarmerCIG/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_FarmerCIG tbl_LK_FarmerCIG = db.tbl_LK_FarmerCIG.Find(id);

            if (tbl_LK_FarmerCIG == null)
            {
                return(HttpNotFound());
            }
            ViewBag.GroupTypeID = new SelectList(db.tbl_LK_Group_type, "GroupTypeID", "GroupTypeName", tbl_LK_FarmerCIG.GroupTypeID);
            ViewBag.StateID     = new SelectList(db.tbl_LK_State, "StateID", "StateName", tbl_LK_FarmerCIG.StateID);
            ViewBag.YearID      = new SelectList(db.tbl_LK_Year, "YearID", "YearID", tbl_LK_FarmerCIG.YearID);
            return(View(tbl_LK_FarmerCIG));
        }