This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using BaseConnectionLibrary.ConnectionClasses; | |
namespace SQL_SplittingTable |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.Text | |
''' <summary> | |
''' Requires | |
''' 1 Button named DistinctGroupButton | |
''' 1 DataGridView named DataGridView1 | |
''' </summary> | |
Public Class Form1 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
Dim dt As New DataTable With {.TableName = "MyTable"} | |
dt.Columns.Add(New DataColumn With {.ColumnName = "Identifier", .DataType = GetType(Integer), |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
USE [master] | |
GO | |
/****** Object: Database [NorthWind2020] Script Date: 7/10/2020 7:51:02 AM ******/ | |
CREATE DATABASE [NorthWind2020] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'NorthWind2020', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\NorthWind2020.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'NorthWind2020_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\NorthWind2020_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
GO |
This file contains hidden or 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 hidden or 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 hidden or 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, |
OlderNewer