public JsonResult MonthlyClearance(NyscMonthlyClearance obj)
        {
            db.NyscMonthlyClearances.Add(obj);

            db.SaveChanges();
            return(Json(obj));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            NyscMonthlyClearance nyscMonthlyClearance = db.NyscMonthlyClearances.Find(id);

            db.NyscMonthlyClearances.Remove(nyscMonthlyClearance);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "CustomerId,Id,EmployeeCode,OurRef,YourRef,Date,Name,NYSC_Code,SatisfactoryMonth,AllowanceMonth,CreatedDate,IsDeleted")] NyscMonthlyClearance nyscMonthlyClearance)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nyscMonthlyClearance).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscMonthlyClearance.EmployeeCode);
     ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscMonthlyClearance.EmployeeCode);
     return(View(nyscMonthlyClearance));
 }
        // GET: NyscMonthlyClearances/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NyscMonthlyClearance nyscMonthlyClearance = db.NyscMonthlyClearances.Find(id);

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

            if (nyscMonthlyClearance == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscMonthlyClearance.EmployeeCode);
            ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscMonthlyClearance.EmployeeCode);
            return(View(nyscMonthlyClearance));
        }