public async Task <ActionResult <Billings> > PostBilling(Billings billing) { _context.billings.Add(billing); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBilling", new { id = billing.billingsId }, billing)); }
public async Task <IActionResult> PutBilling(int id, Billings billing) { if (id != billing.billingsId) { return(BadRequest()); } _context.Entry(billing).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BillingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public IEnumerable <string> GetInvalidLogs() { if (!(Billings?.Any() ?? false)) { yield return($"{GetRecordInfo()}: 請求データを参照できません"); } if (TransferResultCode != 0) { yield return($"{GetRecordInfo()}: 振替不能 ({TransferResultCode})"); } }
public Billings RetrieveClientBills(string id) { Billings billings = new Billings(); try { string query = string.Format("select * from dsto_billing where clientId='{0}' and and Deleted=0", id); var table = DbInfo.ExecuteSelectQuery(query); if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { Billing billing = billings.Add(); SetBilling(billing, row); } } } catch (Exception ex) { throw ex; } return(billings); }
public Billings RetrieveBills() { Billings billings = new Billings(); try { string query = "select * from dsto_billing where Deleted=0"; var table = DbInfo.ExecuteSelectQuery(query); if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { Billing billing = billings.Add(); SetBilling(billing, row); } } } catch (Exception ex) { throw ex; } return(billings); }