Customizing Time Phase columns

Know this is a really old message but as a relatively new user I have been searching through for assistance on some customisation requests I have outstanding... this is fantastic and has saved us between 5-15 hours consultancy costs!

Thank you :)

--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> I would tell you to search the posts of this group, but the search is so useless I will post the code again....
>
> '//**************************************************
> '// Custom VB.NET code for TimePhasForm
> '// Created: 8/22/2007 8:55:46 AM
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
>
> Module Script
>
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents edvTimePhas As EpiDataView
> '// End Wizard Added Module Level Variables **
>
>
> '// Add Custom Module Level Variables Here **
>
>
>
> Sub InitializeCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
> edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
> End If
> '// End Custom Method Calls
> End Sub
>
>
>
> Sub DestroyCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
> '// Begin Wizard Added Object Disposal
>
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
>
> '// End Custom Code Disposal
> End Sub
>
>
>
> Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.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.Initialize) Then
> If (args.Row > -1) Then
> AddParentPart()
> End If
> End If
> End Sub
>
> Private Sub AddParentPart()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("JobNum")) Then
> dr("ParentPart") = getParentPart(dr("JobNum"))
> End If
> Next
> End Sub
>
> Private Function getParentPart(ByVal job As String) As String
> Dim parentPart As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "JobNum = '" + job + "'"
> Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
> Else
> parentPart = ""
> End If
>
> Return parentPart
> End Function
>
>
>
>
> End Module
>
>
> --- In vantage@yahoogroups.com, "Randy" <rweber@> wrote:
> >
> > V8.03.407C
> >
> > I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?
> >
> > If so, please point me in the right direction and I'll fumble through the rest myself.
> >
> >
> > Thanks in advance,
> >
> > Randy Weber
> >
>
V8.03.407C

I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?

If so, please point me in the right direction and I'll fumble through the rest myself.


Thanks in advance,

Randy Weber
I would tell you to search the posts of this group, but the search is so useless I will post the code again....

'//**************************************************
'// Custom VB.NET code for TimePhasForm
'// Created: 8/22/2007 8:55:46 AM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script


'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents edvTimePhas As EpiDataView
'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **



Sub InitializeCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization

edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls

If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
End If
'// End Custom Method Calls
End Sub



Sub DestroyCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal

'// End Custom Code Disposal
End Sub



Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.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.Initialize) Then
If (args.Row > -1) Then
AddParentPart()
End If
End If
End Sub

Private Sub AddParentPart()
For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
If Not IsDBNull(dr("JobNum")) Then
dr("ParentPart") = getParentPart(dr("JobNum"))
End If
Next
End Sub

Private Function getParentPart(ByVal job As String) As String
Dim parentPart As String
Dim recordSelected As Boolean
Dim showSearch As Boolean = False
Dim whereClause As String = "JobNum = '" + job + "'"
Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
If recordSelected Then
parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
Else
parentPart = ""
End If

Return parentPart
End Function




End Module


--- In vantage@yahoogroups.com, "Randy" <rweber@...> wrote:
>
> V8.03.407C
>
> I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?
>
> If so, please point me in the right direction and I'll fumble through the rest myself.
>
>
> Thanks in advance,
>
> Randy Weber
>
I'm attempting to modify and earlier example of adding a column to the Time Phase grid and have a problem with passing parameters to the function to retrieve the PORel record. Not being a .NET programmer but having researched the syntax, it appears there is an argument-list passing problem but I haven't found an example of the proper way to accomplish it yet. Can anyone suggest the right way to make this work?


Private Sub AddShipBy()
For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
If Not IsDBNull(dr("PONum")) Then
dr("ShipBy") = getShipBy(dr("PONum","POLine","PORelNum"))
End If
Next
End Sub

Private Function getShipBy(ByVal PONum As String, ByVal POLine As String, ByVal PORelNum As String) As String
Dim ShipBy As String
Dim recordSelected As Boolean
Dim showSearch As Boolean = False
Dim whereClause As String = "((PONum = " + PONum + ") AND (POLine = " + POLine + ") AND (PORelNum = " + PORelNum +"))"
Dim dsPORel As DataSet = SearchFunctions.listLookup(TimePhasForm, "PORelSearchAdapter", recordSelected, showSearch, whereClause)
If recordSelected Then
ShipBy = dsPORel.Tables(0).Rows(0)("PromiseDt").ToString()
Else
ShipBy = ""
End If

Return ShipBy
End Function

Thanks,
Ed
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of bw2868bond
Sent: Tuesday, August 04, 2009 2:23 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Customizing Time Phase columns



I would tell you to search the posts of this group, but the search is so useless I will post the code again....

'//**************************************************
'// Custom VB.NET code for TimePhasForm
'// Created: 8/22/2007 8:55:46 AM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents edvTimePhas As EpiDataView
'// End Wizard Added Module Level Variables **

'// Add Custom Module Level Variables Here **

Sub InitializeCustomCode()

'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization

edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls

If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
End If
'// End Custom Method Calls
End Sub

Sub DestroyCustomCode()

'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal

'// End Custom Code Disposal
End Sub

Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.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.Initialize) Then
If (args.Row > -1) Then
AddParentPart()
End If
End If
End Sub

Private Sub AddParentPart()
For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
If Not IsDBNull(dr("JobNum")) Then
dr("ParentPart") = getParentPart(dr("JobNum"))
End If
Next
End Sub

Private Function getParentPart(ByVal job As String) As String
Dim parentPart As String
Dim recordSelected As Boolean
Dim showSearch As Boolean = False
Dim whereClause As String = "JobNum = '" + job + "'"
Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
If recordSelected Then
parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
Else
parentPart = ""
End If

Return parentPart
End Function

End Module

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "Randy" <rweber@...> wrote:
>
> V8.03.407C
>
> I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?
>
> If so, please point me in the right direction and I'll fumble through the rest myself.
>
>
> Thanks in advance,
>
> Randy Weber
>


________________________________
The information contained in this message is intended solely for the individual to whom it is specifically and originally addressed. This message and its contents may contain confidential or privileged information. If you are not the intended recipient, you are hereby notified that any disclosure or distribution, or taking any action in reliance on the contents of this information, is strictly prohibited.
We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses.

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.

Thank you.


[Non-text portions of this message have been removed]
PONum, POLine, PORelNo are numbers - not strings
So, Change this:
getShipBy(dr("PONum"),dr("POLine"),dr("PORelNum"))

change this:
Private Function getShipBy(ByVal PONum As Integer, ByVal POLine As Integer, ByVal PORelNum As Integer) As String

and change this:
Dim whereClause As String = "PONum = '" & PONum & "' And POLine = '" & POLine & "' And PORelNum = '" & PORelNum & "'"

Give that a try. Personally to avoid confusion, I do not use field names when passing parameters.

--- In vantage@yahoogroups.com, Ed Garbowski <egarbowski@...> wrote:
>
> I'm attempting to modify and earlier example of adding a column to the Time Phase grid and have a problem with passing parameters to the function to retrieve the PORel record. Not being a .NET programmer but having researched the syntax, it appears there is an argument-list passing problem but I haven't found an example of the proper way to accomplish it yet. Can anyone suggest the right way to make this work?
>
>
> Private Sub AddShipBy()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("PONum")) Then
> dr("ShipBy") = getShipBy(dr("PONum","POLine","PORelNum"))
> End If
> Next
> End Sub
>
> Private Function getShipBy(ByVal PONum As String, ByVal POLine As String, ByVal PORelNum As String) As String
> Dim ShipBy As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "((PONum = " + PONum + ") AND (POLine = " + POLine + ") AND (PORelNum = " + PORelNum +"))"
> Dim dsPORel As DataSet = SearchFunctions.listLookup(TimePhasForm, "PORelSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> ShipBy = dsPORel.Tables(0).Rows(0)("PromiseDt").ToString()
> Else
> ShipBy = ""
> End If
>
> Return ShipBy
> End Function
>
> Thanks,
> Ed
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of bw2868bond
> Sent: Tuesday, August 04, 2009 2:23 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Customizing Time Phase columns
>
>
>
> I would tell you to search the posts of this group, but the search is so useless I will post the code again....
>
> '//**************************************************
> '// Custom VB.NET code for TimePhasForm
> '// Created: 8/22/2007 8:55:46 AM
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents edvTimePhas As EpiDataView
> '// End Wizard Added Module Level Variables **
>
> '// Add Custom Module Level Variables Here **
>
> Sub InitializeCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
> edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
> End If
> '// End Custom Method Calls
> End Sub
>
> Sub DestroyCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
> '// Begin Wizard Added Object Disposal
>
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
>
> '// End Custom Code Disposal
> End Sub
>
> Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.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.Initialize) Then
> If (args.Row > -1) Then
> AddParentPart()
> End If
> End If
> End Sub
>
> Private Sub AddParentPart()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("JobNum")) Then
> dr("ParentPart") = getParentPart(dr("JobNum"))
> End If
> Next
> End Sub
>
> Private Function getParentPart(ByVal job As String) As String
> Dim parentPart As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "JobNum = '" + job + "'"
> Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
> Else
> parentPart = ""
> End If
>
> Return parentPart
> End Function
>
> End Module
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "Randy" <rweber@> wrote:
> >
> > V8.03.407C
> >
> > I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?
> >
> > If so, please point me in the right direction and I'll fumble through the rest myself.
> >
> >
> > Thanks in advance,
> >
> > Randy Weber
> >
>
>
> ________________________________
> The information contained in this message is intended solely for the individual to whom it is specifically and originally addressed. This message and its contents may contain confidential or privileged information. If you are not the intended recipient, you are hereby notified that any disclosure or distribution, or taking any action in reliance on the contents of this information, is strictly prohibited.
> We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses.
>
> This message (including any attachments) is intended only for
> the use of the individual or entity to which it is addressed and
> may contain information that is non-public, proprietary,
> privileged, confidential, and exempt from disclosure under
> applicable law or may constitute as attorney work product.
> If you are not the intended recipient, you are hereby notified
> that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and
> (i) destroy this message if a facsimile or (ii) delete this message
> immediately if this is an electronic communication.
>
> Thank you.
>
>
> [Non-text portions of this message have been removed]
>
Thanks a lot. That fixed it!

Ed
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of bw2868bond
Sent: Monday, October 12, 2009 7:54 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Customizing Time Phase columns



PONum, POLine, PORelNo are numbers - not strings
So, Change this:
getShipBy(dr("PONum"),dr("POLine"),dr("PORelNum"))

change this:
Private Function getShipBy(ByVal PONum As Integer, ByVal POLine As Integer, ByVal PORelNum As Integer) As String

and change this:
Dim whereClause As String = "PONum = '" & PONum & "' And POLine = '" & POLine & "' And PORelNum = '" & PORelNum & "'"

Give that a try. Personally to avoid confusion, I do not use field names when passing parameters.

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ed Garbowski <egarbowski@...> wrote:
>
> I'm attempting to modify and earlier example of adding a column to the Time Phase grid and have a problem with passing parameters to the function to retrieve the PORel record. Not being a .NET programmer but having researched the syntax, it appears there is an argument-list passing problem but I haven't found an example of the proper way to accomplish it yet. Can anyone suggest the right way to make this work?
>
>
> Private Sub AddShipBy()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("PONum")) Then
> dr("ShipBy") = getShipBy(dr("PONum","POLine","PORelNum"))
> End If
> Next
> End Sub
>
> Private Function getShipBy(ByVal PONum As String, ByVal POLine As String, ByVal PORelNum As String) As String
> Dim ShipBy As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "((PONum = " + PONum + ") AND (POLine = " + POLine + ") AND (PORelNum = " + PORelNum +"))"
> Dim dsPORel As DataSet = SearchFunctions.listLookup(TimePhasForm, "PORelSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> ShipBy = dsPORel.Tables(0).Rows(0)("PromiseDt").ToString()
> Else
> ShipBy = ""
> End If
>
> Return ShipBy
> End Function
>
> Thanks,
> Ed
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of bw2868bond
> Sent: Tuesday, August 04, 2009 2:23 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Customizing Time Phase columns
>
>
>
> I would tell you to search the posts of this group, but the search is so useless I will post the code again....
>
> '//**************************************************
> '// Custom VB.NET code for TimePhasForm
> '// Created: 8/22/2007 8:55:46 AM
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents edvTimePhas As EpiDataView
> '// End Wizard Added Module Level Variables **
>
> '// Add Custom Module Level Variables Here **
>
> Sub InitializeCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
> edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
> End If
> '// End Custom Method Calls
> End Sub
>
> Sub DestroyCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
> '// Begin Wizard Added Object Disposal
>
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
>
> '// End Custom Code Disposal
> End Sub
>
> Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.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.Initialize) Then
> If (args.Row > -1) Then
> AddParentPart()
> End If
> End If
> End Sub
>
> Private Sub AddParentPart()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("JobNum")) Then
> dr("ParentPart") = getParentPart(dr("JobNum"))
> End If
> Next
> End Sub
>
> Private Function getParentPart(ByVal job As String) As String
> Dim parentPart As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "JobNum = '" + job + "'"
> Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
> Else
> parentPart = ""
> End If
>
> Return parentPart
> End Function
>
> End Module
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, "Randy" <rweber@> wrote:
> >
> > V8.03.407C
> >
> > I would like to add some columns to the Time Phase Inquiry that come from the job such as the job parent Part number. Is this even possible - adding columns?
> >
> > If so, please point me in the right direction and I'll fumble through the rest myself.
> >
> >
> > Thanks in advance,
> >
> > Randy Weber
> >
>
>
> ________________________________
> The information contained in this message is intended solely for the individual to whom it is specifically and originally addressed. This message and its contents may contain confidential or privileged information. If you are not the intended recipient, you are hereby notified that any disclosure or distribution, or taking any action in reliance on the contents of this information, is strictly prohibited.
> We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses.
>
> This message (including any attachments) is intended only for
> the use of the individual or entity to which it is addressed and
> may contain information that is non-public, proprietary,
> privileged, confidential, and exempt from disclosure under
> applicable law or may constitute as attorney work product.
> If you are not the intended recipient, you are hereby notified
> that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and
> (i) destroy this message if a facsimile or (ii) delete this message
> immediately if this is an electronic communication.
>
> Thank you.
>
>
> [Non-text portions of this message have been removed]
>


________________________________
The information contained in this message is intended solely for the individual to whom it is specifically and originally addressed. This message and its contents may contain confidential or privileged information. If you are not the intended recipient, you are hereby notified that any disclosure or distribution, or taking any action in reliance on the contents of this information, is strictly prohibited.
We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses.

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.

Thank you.


[Non-text portions of this message have been removed]