public async Task <ActionResult <PayementType> > PostPayementType(PayementType payementType) { _context.payementTypes.Add(payementType); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPayementType", new { id = payementType.Id }, payementType)); }
public async Task <IActionResult> PutPayementType(int id, PayementType payementType) { if (id != payementType.Id) { return(BadRequest()); } _context.Entry(payementType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PayementTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult EditPayement(PayementType payement) { if (!CheckCookie()) { return(Redirect("/")); } if (payement != null) { Logic.Info.DB.PaymentTypes.Edited(payement); Logic.Info.DB.Save(); } return(RedirectToAction("Payements")); }
public bool AgreePayment(int UserId, int advertiseId, PayementType paymentType) { PayementType paymenttype = new PayementType(); return(true); }