I sent you an offline on this with the document. There is also another
option using an embedded dashboard if you're interested.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
<http://www.dsmfg.com/>
(Click the logo to view our site) <http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mike Tonoyan
Sent: Monday, June 27, 2011 5:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Adding picture to a form
Rob,
On the "Form Event Wizard" I am missing the "Available Control Events".
I am not sure if the instructions are not complete or we need the Epicor
SDK.
Mike Tonoyan / Natel Engr.
mtonoyan@... <mailto:mtonoyan%40natelengr.com>
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Rob Bucek
Sent: Monday, June 27, 2011 2:04 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Adding picture to a form
This is copied right out of their advanced customization course thingy..
Add a New Sheet and a Picture Box
This workshop requires that at least one graphic file (.jpg, .gif, .bmp,
.png) is included within theattachments for a specific part. While any
part can be used to attach a graphic file, if using theeducation
database included with the manufacturing application, select a part like
4600-1 with nocurrent attachments.
Using the Sheet Wizard, create a new sheet choosing MainPanel1 as the
docking sheet.
Give the sheet a Name
The name should indicate it is used to display picture attachments.
Navigate to the newly created sheet.
Select the Toolbox from the Tools menu in the Customization Tools
Dialog.
Select the GroupBox button and click and drag the group box onto the new
sheet.
Change the text property to Part Picture.
Select the PictureBox button from the Toolbox.
Click and drag the new picture box so that it is centered on the new
group box.
Change the name property of the PictureBox to PicPartAttachment.
Set up the handler for the Picture Box
In this example, it is a good idea to include
two handlers to ensure the code will execute based on a varietyof
events. Specifically, you will use the EpiDataView notification as well
as the ListChanged event handlersto trigger the picture box display of
the contents within the attachments file for Part.
Select the Wizards tab and display the Form Event Wizard sheet.
For Event Type selectListChanged in the Control Type Filter drop-down
list.
Select AutoAttachPart in the View drop down.
Select Click in the Available Control Events drop-down field.
Click the blue right arrow button to add the event.
For Event Type select EpiViewNotification in the Control Type Filter
drop-down list.
Select AutoAttachPart in the View drop down.
Click the Updated Selected Event Code button and then Save the
customization.
Select Click in the Available Control Events drop-down list.
Click the blue right arrow button to add the event.
Author a routine
Add the code below as shown below the DestroyCustomCode area of the
script editor and directlybeneath the End Sub statement
The commented line is not necessary but is shown to indicate the
function of the routine.
Private Sub SetPictureBoxIconFromAttachMent()
'MessageBox.Show("SetPictureBoxIconFromAttachMent") '// ** Get reference
to Part Attachment View ** Dim edvPartAttach As EpiDataView =
CType(oTrans.EpiDataViews("AutoAttachPart") , EpiDataView) If
(Not(edvPartAttach Is Nothing) And (edvPartAttach.dataView.Count > 0))
Then Dim fileName As String = edvPartAttach.dataView(0)("FileName") If
(mFileName <> fileName) Then mFileName = fileName
picPartAttachment.Image = System.Drawing.Image.FromFile(fileName) End If
Else mFileName = String.Empty picPartAttachment.Image = Nothing End If
End Sub
Immediately below this area, look for the event handlers added in the
Form Event Wizard
For each event handler a method call will need to be added to reference
the routine that you havejust authored.
Locate the ListView event handler beginning with Private Sub
Part_DataView_ListChanged.
Under the commented lines below Add Event Handler here, enter the method
call:SetPictureBoxIconFromAttachMent()
The entire event handler should appear as below:
Private Sub Part_DataView_ListChanged(ByVal sender As Object, ByVal args
As ListChangedEventArgs) Handles Part_DataView.ListChanged '// **
Argument Properties and Uses ** '// Part_DataView(0)("[FieldName]") '//
args.ListChangedType, args.NewIndex, args.OldIndex '//
ListChangedType.ItemAdded, ListChangedType.ItemChanged,
ListChangedType.ItemDeleted, ListChangedType.ItemMoved,
ListChangedType.Reset ' 'Add Event Handler Code '
SetPictureBoxIconFromAttachMent() End Sub
Continuing with the second event handler for EpiDataView, add the method
call as shown below
Private Sub edvAutoAttachPart_EpiViewNotification(view As EpiDataView,
args As EpiNotifyArgs) Handles edvAutoAttachPart.EpiViewNotification '//
** Argument Properties and Uses ** '//
view.dataView(args.Row)("[FieldName]") '// args.Row, args.Column,
args.Sender, args.NotifyType '// NotifyType.Initialize,
NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView,
NotifyType.InitAndResetTreeNodes If (args.NotifyType =
EpiTransaction.NotifyType.AddRow) Then If (args.Row > -1) Then
SetPictureBoxIconFromAttachMent() End If End If End Sub
Compile the code and test the functionality
Launch the maximized Script Editor into view.
Select Test Code from the Tools menu in the Customization Tools Dialog
window
A message displays at the lower portion of the screen indicating the
status of the compiled code.
If successful, Save the customization and close the Customization Tools
Dialog window.
Maybe that will work for you..
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
<http://www.dsmfg.com/>
(Click the logo to view our site) <http://www.dsmfg.com/>
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Mike Tonoyan
Sent: Monday, June 27, 2011 3:18 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Adding picture to a form
We are about to implement Asset Management module in 9.04.507. We would
like to customize the "Asset Tracker" form to show pictures. Has anyone
done a customization like that? If so, how easy is it?
Mike Tonoyan / Natel Engr.
mtonoyan@... <mailto:mtonoyan%40natelengr.com>
<mailto:mtonoyan%40natelengr.com>
<mailto:mtonoyan%40natelengr.com>
__________________________________________________________
Notice: This email transmission may contain confidential information and
is intended only for the person(s) named. Any use, copying or disclosure
to/by any other person(s) is strictly prohibited. By accepting this
information, recipients confirm that they understand and will comply
with all applicable ITAR and EAR requirements.
__________________________________________________________
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
__________________________________________________________
Notice: This email transmission may contain confidential information and
is intended only for the person(s) named. Any use, copying or disclosure
to/by any other person(s) is strictly prohibited. By accepting this
information, recipients confirm that they understand and will comply
with all applicable ITAR and EAR requirements.
__________________________________________________________
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
option using an embedded dashboard if you're interested.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
<http://www.dsmfg.com/>
(Click the logo to view our site) <http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mike Tonoyan
Sent: Monday, June 27, 2011 5:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Adding picture to a form
Rob,
On the "Form Event Wizard" I am missing the "Available Control Events".
I am not sure if the instructions are not complete or we need the Epicor
SDK.
Mike Tonoyan / Natel Engr.
mtonoyan@... <mailto:mtonoyan%40natelengr.com>
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Rob Bucek
Sent: Monday, June 27, 2011 2:04 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Adding picture to a form
This is copied right out of their advanced customization course thingy..
Add a New Sheet and a Picture Box
This workshop requires that at least one graphic file (.jpg, .gif, .bmp,
.png) is included within theattachments for a specific part. While any
part can be used to attach a graphic file, if using theeducation
database included with the manufacturing application, select a part like
4600-1 with nocurrent attachments.
Using the Sheet Wizard, create a new sheet choosing MainPanel1 as the
docking sheet.
Give the sheet a Name
The name should indicate it is used to display picture attachments.
Navigate to the newly created sheet.
Select the Toolbox from the Tools menu in the Customization Tools
Dialog.
Select the GroupBox button and click and drag the group box onto the new
sheet.
Change the text property to Part Picture.
Select the PictureBox button from the Toolbox.
Click and drag the new picture box so that it is centered on the new
group box.
Change the name property of the PictureBox to PicPartAttachment.
Set up the handler for the Picture Box
In this example, it is a good idea to include
two handlers to ensure the code will execute based on a varietyof
events. Specifically, you will use the EpiDataView notification as well
as the ListChanged event handlersto trigger the picture box display of
the contents within the attachments file for Part.
Select the Wizards tab and display the Form Event Wizard sheet.
For Event Type selectListChanged in the Control Type Filter drop-down
list.
Select AutoAttachPart in the View drop down.
Select Click in the Available Control Events drop-down field.
Click the blue right arrow button to add the event.
For Event Type select EpiViewNotification in the Control Type Filter
drop-down list.
Select AutoAttachPart in the View drop down.
Click the Updated Selected Event Code button and then Save the
customization.
Select Click in the Available Control Events drop-down list.
Click the blue right arrow button to add the event.
Author a routine
Add the code below as shown below the DestroyCustomCode area of the
script editor and directlybeneath the End Sub statement
The commented line is not necessary but is shown to indicate the
function of the routine.
Private Sub SetPictureBoxIconFromAttachMent()
'MessageBox.Show("SetPictureBoxIconFromAttachMent") '// ** Get reference
to Part Attachment View ** Dim edvPartAttach As EpiDataView =
CType(oTrans.EpiDataViews("AutoAttachPart") , EpiDataView) If
(Not(edvPartAttach Is Nothing) And (edvPartAttach.dataView.Count > 0))
Then Dim fileName As String = edvPartAttach.dataView(0)("FileName") If
(mFileName <> fileName) Then mFileName = fileName
picPartAttachment.Image = System.Drawing.Image.FromFile(fileName) End If
Else mFileName = String.Empty picPartAttachment.Image = Nothing End If
End Sub
Immediately below this area, look for the event handlers added in the
Form Event Wizard
For each event handler a method call will need to be added to reference
the routine that you havejust authored.
Locate the ListView event handler beginning with Private Sub
Part_DataView_ListChanged.
Under the commented lines below Add Event Handler here, enter the method
call:SetPictureBoxIconFromAttachMent()
The entire event handler should appear as below:
Private Sub Part_DataView_ListChanged(ByVal sender As Object, ByVal args
As ListChangedEventArgs) Handles Part_DataView.ListChanged '// **
Argument Properties and Uses ** '// Part_DataView(0)("[FieldName]") '//
args.ListChangedType, args.NewIndex, args.OldIndex '//
ListChangedType.ItemAdded, ListChangedType.ItemChanged,
ListChangedType.ItemDeleted, ListChangedType.ItemMoved,
ListChangedType.Reset ' 'Add Event Handler Code '
SetPictureBoxIconFromAttachMent() End Sub
Continuing with the second event handler for EpiDataView, add the method
call as shown below
Private Sub edvAutoAttachPart_EpiViewNotification(view As EpiDataView,
args As EpiNotifyArgs) Handles edvAutoAttachPart.EpiViewNotification '//
** Argument Properties and Uses ** '//
view.dataView(args.Row)("[FieldName]") '// args.Row, args.Column,
args.Sender, args.NotifyType '// NotifyType.Initialize,
NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView,
NotifyType.InitAndResetTreeNodes If (args.NotifyType =
EpiTransaction.NotifyType.AddRow) Then If (args.Row > -1) Then
SetPictureBoxIconFromAttachMent() End If End If End Sub
Compile the code and test the functionality
Launch the maximized Script Editor into view.
Select Test Code from the Tools menu in the Customization Tools Dialog
window
A message displays at the lower portion of the screen indicating the
status of the compiled code.
If successful, Save the customization and close the Customization Tools
Dialog window.
Maybe that will work for you..
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
<http://www.dsmfg.com/>
(Click the logo to view our site) <http://www.dsmfg.com/>
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Mike Tonoyan
Sent: Monday, June 27, 2011 3:18 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Adding picture to a form
We are about to implement Asset Management module in 9.04.507. We would
like to customize the "Asset Tracker" form to show pictures. Has anyone
done a customization like that? If so, how easy is it?
Mike Tonoyan / Natel Engr.
mtonoyan@... <mailto:mtonoyan%40natelengr.com>
<mailto:mtonoyan%40natelengr.com>
<mailto:mtonoyan%40natelengr.com>
__________________________________________________________
Notice: This email transmission may contain confidential information and
is intended only for the person(s) named. Any use, copying or disclosure
to/by any other person(s) is strictly prohibited. By accepting this
information, recipients confirm that they understand and will comply
with all applicable ITAR and EAR requirements.
__________________________________________________________
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
__________________________________________________________
Notice: This email transmission may contain confidential information and
is intended only for the person(s) named. Any use, copying or disclosure
to/by any other person(s) is strictly prohibited. By accepting this
information, recipients confirm that they understand and will comply
with all applicable ITAR and EAR requirements.
__________________________________________________________
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]