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 @Packs AS NVARCHAR(MAX) | |
select @Packs = STUFF((SELECT DISTINCT ',' + QUOTENAME(LTRIM(RTRIM(Pack))) from basequeryTotalPupsByRegion FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'),1,1,'') | |
select @Packs |
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
''' <summary> | |
''' Returns the value of GridEX's current cell, if it exists, otherwise an empty string. | |
''' </summary> | |
''' <param name="GridEX">GridEX</param> | |
''' <param name="ColumnName">Name of GridEX cell to interrogate.</param> | |
''' <returns>String</returns> | |
Private Function GetGridEXCellValue(GridEX As GridEX, ColumnName As String) As String | |
Dim CellValue As String = "" | |
'the gridex contains a column called FilesDirectory where the project's files are stored | |
'this sub will get the currently selected row in the GridEX, identify the FilesDirectory value |
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
'Me.ItemsListView has two columns, one for the file name and one for the full file path | |
Dim FileAttributes(2) As String | |
FileAttributes(0) = FileInfo.Name | |
FileAttributes(1) = FileInfo.FullName | |
Dim ListViewItem As New ListViewItem(FileAttributes) | |
Me.ItemsListView.Items.Add(ListViewItem) |
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
For Each SpecialFolder As Environment.SpecialFolder In System.Enum.GetValues(GetType(Environment.SpecialFolder)) | |
Debug.Print(System.Environment.GetFolderPath(SpecialFolder)) | |
Next |
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
For Each SpecialFolder As String In System.Enum.GetNames(GetType(Environment.SpecialFolder)) | |
Debug.Print(SpecialFolder) | |
Next |
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
''' <summary> | |
''' Returns a DataTable containing metadata about the structure of the submitted DataTable | |
''' </summary> | |
''' <param name="InputDataTable">DataTable to describe.</param> | |
''' <returns>DataTable</returns> | |
Public Function GetMetadataDataTable(InputDataTable As DataTable) As DataTable | |
Dim ColumnsDataTable As New DataTable("Columns") | |
'column names column |
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
'the gridex contains a column called FilesDirectory where the project's files are stored | |
'this sub will get the currently selected row in the GridEX, identify the FilesDirectory value | |
'and attempt to open the path using a process (file explorer, most likely) | |
Try | |
'get the current row of the VS GridEX | |
If Not Me.TblVitalSignsGridEX.CurrentRow Is Nothing Then | |
Dim CurrentRow As GridEXRow = Me.TblVitalSignsGridEX.CurrentRow | |
'loop through the columns and look for the FilesDirectory columns | |
For i As Integer = 0 To CurrentRow.Cells.Count - 1 | |
If CurrentRow.Cells(i).Column.Key = "FilesDirectory" Then |
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
'Put a report viewer on a form and build the report using the wizard | |
'Create a report parameter based on the filter criteria you would like to use. "IDReportParameter",22, for example to filter on ID=22 | |
'In the report open the Tablix's properties and select Filters and set up the filter using the wizard | |
'In the master DataGridView's SelectionChanged (or other event) event add code similar to | |
Dim MyReportParameter As New ReportParameter("IDReportParameter", 22) | |
Me.WorkLogReportViewer.LocalReport.SetParameters(MyReportParameter) | |
Me.WorkLogReportViewer.RefreshReport() |
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
''' <summary> | |
''' Loads distinct items from a DataTable's DataColumn into a GridEX GridEXColumn's DropDown ValueList | |
''' </summary> | |
''' <param name="GridEX">The GridEX containing the GridEXColumn requiring a DropDown ValueList</param> | |
''' <param name="SourceDataTable">Name of the DataTable containing the DataColumn from which distinct values will be drawn</param> | |
''' <param name="SourceColumnName">Name of the source DataTable's DataColumn from which distinct values will be drawn</param> | |
''' <param name="GridEXColumnName">Name of the GridEX column into which to load dropdown values</param> | |
Private Sub LoadGridEXDropDown(GridEX As GridEX, SourceDataTable As DataTable, SourceColumnName As String, GridEXColumnName As String, LimitToList As Boolean) | |
Try | |
'Ensure the GridEXColumn is configured for a DropDown |
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
Private Sub SetUpGridEX() | |
'create the Janus GridEX | |
Dim MyGridEX As New GridEX | |
With MyGridEX | |
.Name = DT.TableName & "GridEX" | |
.Dock = DockStyle.Fill | |
.DataSource = MyBindingSource | |
.BoundMode = BoundMode.Bound | |
.GroupByBoxVisible = True | |
.Hierarchical = False |
NewerOlder