public ActionResult Save(Tbl_Records rec)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                using (DboKursListesiEntities db = new DboKursListesiEntities())
                {
                    if (rec.recordId > 0)
                    {
                        var v = db.Tbl_Records.FirstOrDefault(a => a.recordId == rec.recordId);
                        if (v != null)
                        {
                            v.CourseName      = rec.CourseName;
                            db.Entry(v).State = EntityState.Modified;
                        }
                    }
                    else
                    {
                        db.Tbl_Records.Add(rec);
                    }
                    db.SaveChanges();
                    status = true;
                }
            }
            return(new JsonResult {
                Data = new { status }
            });
        }
        public JsonResult Remove(int InfoId)
        {
            bool status = false;

            using (DboKursListesiEntities _db = new DboKursListesiEntities())
            {
                var record = _db.Tbl_RecordsInfo.FirstOrDefault(a => a.InfoId == InfoId);


                if (record != null)
                {
                    _db.Tbl_RecordsInfo.Remove(record);
                }
                _db.SaveChanges();
                status = true;
            }

            return(new JsonResult {
                Data = new { status = status }
            });
        }