public int Delete(int id)
        {
            TMS_JobProgression accountsBankDetails = _dbContext.TMS_JobProgression.Find(id);

            if (accountsBankDetails != null)
            {
                _dbContext.TMS_JobProgression.Remove(accountsBankDetails);
                _s = Save();
                return(_s);
            }
            return(_s);
        }
 public IHttpActionResult Post(TMS_JobProgression jp)
 {
     if (ModelState.IsValid)
     {
         int c = _jprogBll.Insert(jp);
         if (c == 1)
         {
             return(Json(new { Msg = "1" }));
         }
         return(Json(new { Msg = "0" }));
     }
     else
     {
         return(Json(new { Msg = "0" }));
     }
 }
        public IHttpActionResult UpdateJobProgression(int id, TMS_JobProgression jp)
        {
            if (!ModelState.IsValid)
            {
                //return BadRequest(ModelState);
                return(Json(new { Msg = "0" }));
            }

            if (id != jp.Id)
            {
                //return BadRequest();
                return(Json(new { Msg = "0" }));
            }

            try
            {
                int s = _jprogBll.Update(jp);
                if (s == 1)
                {
                    return(Json(new { Msg = "1" }));
                }
                return(Json(new { Msg = "0" }));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!JobProgressionMappingExists(id))
                {
                    //return NotFound();
                    return(Json(new { Msg = "0", Reason = "No row affected!" }));
                }
                else
                {
                    throw;
                }
            }
        }
 public int Update(TMS_JobProgression accountsBankDetails)
 {
     _dbContext.Entry(accountsBankDetails).State = EntityState.Modified;
     _s = Save();
     return(_s);
 }
 public int Insert(TMS_JobProgression accountsBankDetails)
 {
     _dbContext.TMS_JobProgression.Add(accountsBankDetails);
     return(Save());
 }
 public int Update(TMS_JobProgression jp)
 {
     return(_repository.Update(jp));
 }
 public int Insert(TMS_JobProgression jp)
 {
     return(_repository.Insert(jp));
 }