This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports SpreadsheetLight | |
''' <summary> | |
''' Commonly used methods for SpreadSheetLight library. | |
''' Anytime there are methods that are used over and over again | |
''' consider placing those methods in this module. | |
''' | |
''' To use them simply call the method as this module has | |
''' public scope in the project it resides or in a class project | |
''' another main project references. | |
''' </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.ComponentModel | |
Imports System.Runtime.CompilerServices | |
''' <summary> | |
''' Requires two ListBox controls, ListBox1, ListBox2 | |
''' | |
''' Shows a simple use of a Interface and a simple use | |
''' of a BindingList. Note by implementing INotifyPropertyChanged and a BindingList | |
''' we can update a ListBox while without the BindingList the change is not | |
''' reflected in the second listbox. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.ComponentModel | |
Imports System.ComponentModel.DataAnnotations | |
Imports System.Runtime.CompilerServices | |
Public Class CustomerEntity | |
Inherits BaseEntity | |
Implements INotifyPropertyChanged | |
Private _customerIdentifier1 As Integer | |
Private _companyName1 As String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.IO | |
''' <summary> | |
''' Simple extension method to export all checked rows, | |
''' all columns except for the first column which would be | |
''' the check box column | |
''' </summary> | |
Module DataGridViewExtensions | |
''' <summary> | |
''' Export to text file | |
''' </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Cust.CustomerIdentifier, | |
Cust.CompanyName, | |
Cust.ContactId, | |
CT.ContactTitle, | |
C.FirstName, | |
C.LastName, | |
Cust.Street, | |
Cust.City, | |
Cust.Region, | |
Cust.PostalCode, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CategoryID, | |
CategoryName | |
FROM NorthWind2020.dbo.Categories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @OrderIdentifier INT= 10248; | |
SELECT O.OrderID, | |
O.CustomerIdentifier, | |
O.EmployeeID, | |
E.Title + ' ' + E.FirstName + ' ' + E.LastName AS Employee, | |
O.OrderDate, | |
O.RequiredDate, | |
O.ShippedDate, | |
O.ShipVia, | |
O.Freight, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @OrderIdentifier INT= 10248; | |
SELECT p.ProductName, | |
od.ProductID, | |
od.UnitPrice, | |
od.Quantity, | |
od.Discount | |
FROM OrderDetails AS od | |
INNER JOIN Products AS p ON od.ProductID = p.ProductID | |
WHERE od.OrderID = @OrderIdentifier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT E.EmployeeID, | |
E.TitleOfCourtesy, | |
E.LastName, | |
E.FirstName, | |
CT.ContactTitle, | |
CONVERT(VARCHAR, E.BirthDate, 1) AS BirthDate, | |
CONVERT(VARCHAR, E.HireDate, 1) AS HireDate, | |
E.Address AS Street, | |
E.City, | |
E.Region, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @CategoryID INT= 2; | |
SELECT P.ProductID, | |
P.ProductName, | |
P.UnitPrice, | |
P.UnitsInStock, | |
P.SupplierID, | |
S.CompanyName AS SupplierName, | |
C.[Name] AS SupplierCountry | |
FROM Products AS P | |
INNER JOIN Suppliers AS S ON P.SupplierID = S.SupplierID |
OlderNewer