Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Photo

Status
Not open for further replies.

tdonahue

Technical User
Feb 4, 2001
50
0
0
US
I have an employee table that has 9 people in it.
I have the 9 pictures of the employees.
I have a combo box on top of the form that picks the employees.
All the other information on the employee shows up. I don't even know where to start on writing te code for this .

can anyone help?


 
hi
u can use small imagelist if the data appears in listview or use picturebox to solve ur problem.........
 
My current code looks like this :
In my DA level:
Public Structure EmployeeData
Dim Photo As System.Drawing.Image

Public Function Clone() As EmployeeData
.Photo = Me.Photo
End With
Return stcClone
End Function

Private Function CloneForInterface() As Object Implements System.ICloneable.Clone
Return Clone()
End Function

End Structure


Private Function GetStructureFromDataset() As EmployeeData
Dim stc As EmployeeData


stc.Photo.FromFile("Northwind.dat")

End With
stc.EmployeeList = m_dtsNorthwind.Tables.Item("EmployeeList")
'return
Return stc
End Function

Public Sub UpdateData(ByVal data As EmployeeData)
'bind dataset to structure
With m_dtsNorthwind.Tables.Item("Employee").Rows(0)
.Item("Photo") = data.Photo
End With
'update dataset to database
Me.Update()
End Sub



In my BL level

Public Property Photo() As System.Drawing.Image
Get
Return m_stcCurrentData.Photo
End Get
Set(ByVal Value As System.Drawing.Image)
'check current state
Select Case Me.MachineState
Case MachineState.AddNew, MachineState.Edit

m_stcCurrentData.Photo = Value
SetIsDirty(True)
End If
Case Else
Throw New ReadOnlyException()
End Select
End Set
End Property

Any help would be appreciated

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top