public IHttpActionResult Post(Acc_Retirements accountsBankDetails)
 {
     if (ModelState.IsValid)
     {
         int c = _accRetirementsBll.Insert(accountsBankDetails);
         if (c == 1)
         {
             return(Json(new { Msg = "1" }));
         }
         return(Json(new { Msg = "0" }));
     }
     else
     {
         return(Json(new { Msg = "0" }));
     }
 }
        public IHttpActionResult UpdateRetirements(int id, Acc_Retirements accountsBankDetails)
        {
            if (!ModelState.IsValid)
            {
                //return BadRequest(ModelState);
                return(Json(new { Msg = "0" }));
            }

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

            try
            {
                int s = _accRetirementsBll.Update(accountsBankDetails);
                if (s == 1)
                {
                    return(Json(new { Msg = "1" }));
                }
                return(Json(new { Msg = "0" }));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!BankMappingExists(id))
                {
                    //return NotFound();
                    return(Json(new { Msg = "0", Reason = "No row affected!" }));
                }
                else
                {
                    throw;
                }
            }
        }
 public int Update(Acc_Retirements accountsBankDetails)
 {
     return(_reposirory.Update(accountsBankDetails));
 }
 public int Insert(Acc_Retirements accountsBankDetails)
 {
     return(_reposirory.Insert(accountsBankDetails));
 }