public IHttpActionResult Post(Acc_Accounts_BankDetails accountsBankDetails) { if (ModelState.IsValid) { int c = _accountsBankDetailsBll.Insert(accountsBankDetails); if (c == 1) { return(Json(new { Msg = "1" })); } return(Json(new { Msg = "0" })); } else { return(Json(new { Msg = "0" })); } }
public IHttpActionResult UpdateAccountsBankDetails(int id, Acc_Accounts_BankDetails 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 = _accountsBankDetailsBll.Update(accountsBankDetails); if (s == 1) { return(Json(new { Msg = "1" })); } return(Json(new { Msg = "0" })); } catch (DbUpdateConcurrencyException) { if (!DeleteAccountsBankDetailsExists(id)) { //return NotFound(); return(Json(new { Msg = "0", Reason = "No row affected!" })); } else { throw; } } }
public int Update(Acc_Accounts_BankDetails accountsBankDetails) { return(_reposirory.Update(accountsBankDetails)); }
public int Insert(Acc_Accounts_BankDetails accountsBankDetails) { return(_reposirory.Insert(accountsBankDetails)); }