public IHttpActionResult Post(TMS_CashBidding tmsCashBidding) { if (tmsCashBidding == null) { return(Json(new { Msg = "0" })); } try { int s = _objCashBiddingBll.Insert(tmsCashBidding); if (s == 1) { return(Json(new { Msg = "1" })); } return(Json(new { Msg = "0" })); } catch (DbUpdateConcurrencyException) { return(Json(new { Msg = "0", Reason = "No row affected!" })); } }
public IHttpActionResult UpdateCrmContact(int id, TMS_CashBidding tmsCashBidding) { if (!ModelState.IsValid) { //return BadRequest(ModelState); return(Json(new { Msg = "0" })); } if (id != tmsCashBidding.Id) { //return BadRequest(); return(Json(new { Msg = "0" })); } try { int s = _objCashBiddingBll.Update(tmsCashBidding); if (s == 1) { return(Json(new { Msg = "1" })); } return(Json(new { Msg = "0" })); } catch (DbUpdateConcurrencyException) { if (!TmsCashBiddingExists(id)) { //return NotFound(); return(Json(new { Msg = "0", Reason = "No row affected!" })); } else { throw; } } }
public int Insert(TMS_CashBidding tmsCashBidding) { return(_repository.Insert(tmsCashBidding)); }
public int Update(TMS_CashBidding tmsDisbursment) { return(_repository.Update(tmsDisbursment)); }