partial void OnPaymentByChanged() { if (!string.IsNullOrEmpty(_PaymentBy)) { _PaymentBy = PaymentBy.TextEncode(); } }
public IHttpActionResult PutPaymentBy(int id, PaymentBy paymentby) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != paymentby.Id) { return BadRequest(); } try { _PaymentByService.Update(paymentby); } catch (DbUpdateConcurrencyException) { if (!PaymentByExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); }
public IHttpActionResult Post(PaymentBy applyAt) { if (!ModelState.IsValid) { return BadRequest(ModelState); } _PaymentByService.Create (applyAt); return Created(applyAt); }
public IHttpActionResult PostPaymentBy(PaymentBy paymentby) { if (!ModelState.IsValid) { return BadRequest(ModelState); } _PaymentByService.Create(paymentby); return CreatedAtRoute("DefaultApi", new { id = paymentby.Id }, paymentby); }