IIS – Server 2003

Start > All Programs > Administrative Tools > Internet Information Services Manager (IIS)

Team City – Continuous Integration and Automated Testing

If Team City returns "Failure" > "Build Errors"
error MSB4019: The imported project "C:\Microsoft.VisualBasic.targets" was not found.
Then Team City is not using Microsoft Framework 3.5
Then go to Project Settings > Runner >
If using Visual Studio 2008 for a project .proj file then use
Build Version 3.5
Tools Version 3.5

Sln2008 only for solution files

Move to Server
Download – install – choose port
Access from another computer by using server address : port no.

Using Microsoft SQL Server
In order to use Windows Authentication need to copy dll file. In my case was
…Microsoft SQL Server JDBC Driver\sqljdbc_2.0\enu\auth\x86\sqljdbc_auth.dll
into Windows\System32 directory
file database.properties was

Object binding to a BindingSource (and probably a DataGridView) – Add New Item


Private Sub DecisionBindingSource_AddingNew(ByVal sender As System.Object, ByVal e As System.ComponentModel.AddingNewEventArgs) Handles DecisionBindingSource.AddingNew

Dim dNew As New Decision
dNew.DateInput = Today
dNew.IsNew = True
dNew.StatusID = Decision.StatusIDEnum.Current

Dim dList As IList(Of Decision) = CType(DecisionBindingSource.DataSource, IList(Of Decision))
dNew.ID = dList.Max(Function(d) d.ID) + 1
e.NewObject = dNew

Catch ex As Exception
End Try

End Sub

Lambda VB.Net Max



Dim dList As IList(Of Decision) = CType(DecisionBindingSource.DataSource, IList(Of Decision))
dNew.ID = dList.Max(
Function(d) d.ID) + 1

Talking about How to: Bind Windows Forms Controls to DBNull Database Values

How to: Bind Objects to Windows Forms DataGridView Controls


Taken from MSDN Link Here but adjusted to make abstract

Private Sub SetupDGVComboBoxToEnum()
DGVColumnStatusID.DataPropertyName = "StatusID"
DGVColumnStatusID.Name = "Status"
End Sub

Private Sub SetupDGVComboBoxColumnToEnumType(ByVal enumType As Type)
DGVColumnStatusID.DataSource = [Enum].GetValues(enumType)
End Sub

Most Recently Used for objects on a form

Probably other ways of doing this. However this is my quickly devised method. Using a MRUToolStripDropDownButton.
Need to call MRUAdd after loading an object

Private mruList As IList(Of T)

Private Sub MRUAdd()
If mruList.Contains(Me.cPadMain) Then
End If

If mruList.Where(Function(m) m.ID = cPadMain.ID).Count = 0 Then
mruList.Insert(0, Me.cPadMain)
End If

End Sub

Private Sub MRUDisplay()

Dim MRU As IEnumerable(Of PadMain) = From pm In mruList Order By pm.PadMaterial Descending
For Each pm As PadMain In MRU
Dim tsi As New ToolStripMenuItem
tsi.Tag = pm.ID
tsi.Text = pm.Pad + " in " + pm.Material.Material + " " + pm.ID.ToString
MRUToolStripDropDownButton.DropDownItems.Insert(0, tsi)
If MRUToolStripDropDownButton.DropDownItems.Count > 10 Then
Exit For
End If

End Sub

LINQ samples

To use LINQ need

Imports System.Linq
May need reference to System.Core and System.Data
Dim MRU As IEnumerable(Of PadMain) = From pm In mruList OrderBy pm.PadMaterial

LINQ to Entity Framework

context As BC.SWT.EntityModel.SOPEntities

Dim EntityConnectionString = Configuration.ConfigurationManager.ConnectionStrings(“SOPEntities”).ConnectionString
context = New BC.SWT.EntityModel.SOPEntities(EntityConnectionString)

CustomerQuery AsObjectQuery(OfCustomer) = context.Customers
Dim results = From a In CustomerQuery Select a.CustomerID, a.Customer1 OrderBy Customer1


Lamda Where

If cPadMain.PadHistoryList.Where(Function(h) h.IsNew = True).Count <> 0 Then
Dim cPadHistoryData As New PadHistoryData(Me.ConnectionStringSettings)
For Each ph As PadHistory In cPadMain.PadHistoryList.Where(Function(h) h.IsNew = True)
End If

Lamda Max

Dim dList As IList(Of Decision) = CType(DecisionBindingSource.DataSource, IList(Of Decision))
dNew.ID = dList.Max(Function(d) d.ID) + 1

Lamda check for repeats

Public Function IsSupplierPriorityOK() As Boolean
    'Lambda Check for repeats
    For Each cs1 As Costing.ComponentSupplier In Me.ComponentSupplierList.OrderBy(Function(h) h.Priority)
        Dim p1 As Integer = cs1.Priority
        If Me.ComponentSupplierList.Where(Function(h) h.Priority = p1).Count <> 1 Then
            Return False
        End If
    Return True
End Function


Help system ?
UML or other design documentation
SQL manipulate from where ? SSMS or VS
Certification – Too difficult – too much detail on individual subjects. MCTS 70-433 SQL Server Development
Any experience of T4 v CodeDom
Grog Talk interactive idea – How Visual Studio could be better
Naming Conventions
Data access technologies – Datasets – Directly coded – LINQ to SQL – Entity Framework ?
LINQ – Lambda