// GET: Salary/Delete/5
        public ActionResult Delete(Salary_Table IdToDel)
        {
            var d = obj.Salary_Table.Where(x => x.id == IdToDel.id).FirstOrDefault();

            obj.Salary_Table.Remove(d);
            obj.SaveChanges();
            return(RedirectToAction("SalaryDetails"));
        }
 public ActionResult Create([Bind(Exclude = "id")] Salary_Table db)
 {
     if (!ModelState.IsValid)
     {
         return(View());
     }
     obj.Salary_Table.Add(db);
     obj.SaveChanges();
     //Response.Redirect("StudentAdmission",true);
     return(RedirectToAction("SalaryDetails"));
 }
        public ActionResult Edit(Salary_Table IdToEdit)
        {
            var orignalRecord = (from m in obj.Salary_Table where m.id == IdToEdit.id select m).First();

            if (!ModelState.IsValid)
            {
                return(View(orignalRecord));
            }
            obj.Entry(orignalRecord).CurrentValues.SetValues(IdToEdit);

            obj.SaveChanges();
            return(RedirectToAction("SalaryDetails"));
        }