/// <summary> /// Delete a bill /// </summary> public void DeleteBill() { try { string sql = @" DELETE FROM Bills WHERE BillId = ?"; // Add query parameters (Dont change the order of parameters) database.QueryParameters.Add("@BillId", this.BillId); database.DeleteRecord(sql); if (this.BillRows.Count > 0) { BillRow billRow = new BillRow(); billRow.DeleteBillRowsByBillId(this.BillId); } } catch (Exception ex) { throw ex; } }