public async Task <ActionResult <OrgFee> > PostOrgFee(OrgFee orgFee) { _context.OrgFee.Add(orgFee); await _context.SaveChangesAsync(); return(CreatedAtAction("GetOrgFee", new { id = orgFee.OrgFeeId }, orgFee)); }
public async Task <IActionResult> PutOrgFee(int id, OrgFee orgFee) { if (id != orgFee.OrgFeeId) { return(BadRequest()); } _context.Entry(orgFee).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrgFeeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public static OrgFee Parse(Parser parser, int startindent) { if (parser.curr.kw != Parser.RegKeywords.None) { throw parser.GetException("expected orgid only"); } var oid = parser.GetInt(); if (oid == 0) { parser.lineno--; throw parser.GetException("invalid orgid"); } var f = new OrgFee { OrgId = oid }; if (parser.curr.indent > startindent) { if (parser.curr.kw != Parser.RegKeywords.Fee) { throw parser.GetException("expected fee"); } f.Fee = parser.GetDecimal(); } return(f); }
public static OrgFees Parse(Parser parser) { var ff = new OrgFees(); parser.lineno++; var startindent = parser.curr.indent; while (parser.curr.indent == startindent) { var f = OrgFee.Parse(parser, startindent); ff.list.Add(f); } return(ff); }
public static OrgFee Parse(Parser parser, int startindent) { if (parser.curr.kw != Parser.RegKeywords.None) throw parser.GetException("expected orgid only"); var oid = parser.GetInt(); if (oid == 0) { parser.lineno--; throw parser.GetException("invalid orgid"); } var f = new OrgFee { OrgId = oid }; if (parser.curr.indent > startindent) { if (parser.curr.kw != Parser.RegKeywords.Fee) throw parser.GetException("expected fee"); f.Fee = parser.GetDecimal(); } return f; }