public bool Delete(string invoiceNumber) { bool isDeleteSuccess = false; sqlHelper = new SqlConnectionHelper(); SqlCommand command = new SqlCommand(); //DataTable dtResults = new DataTable(); DataSet dsResults = new DataSet(); command.CommandType = CommandType.StoredProcedure; command.CommandText = "[Billing].[DeleteInvoice]"; command.Parameters.AddWithValue("@InvoiceNumber", invoiceNumber); dsResults = sqlHelper.ExecuteStoredProcedure(command); if (dsResults != null && dsResults.Tables.Count > 0) { if (Convert.ToInt32(dsResults.Tables[0].Rows[0][0]) == 1) { isDeleteSuccess = true; } } return(isDeleteSuccess); }
public QueryBuilderService(ISqlConnectionHelper sqlConnectionHelper, QueryBuilderDbContext context) { _sqlConnectionHelper = sqlConnectionHelper; _context = context; }