Performing an action after clicking save on the standard toolbar

Thank you very much Ian for taking the time do write that, I will try it and get back to you.

-Ted



________________________________
From: Ian <ianwhardy@...>
To: vantage@yahoogroups.com
Sent: Friday, September 2, 2011 7:06 AM
Subject: [Vantage] Re: Performing an action after clicking save on the standard toolbar

If this 'A' is actually an A, then you could do the following:

Private Function GetNextKey() As String
'//Use the company Adapter to Store our sequance number Number01

Dim nextKey As String = String.Empty
Dim companyAdapter As CompanyAdapter = New CompanyAdapter(PartForm)
companyAdapter.BOConnect()
Dim company As String = PartForm.Session.CompanyID
Dim found As Boolean = companyAdapter.GetByID(company)

if (found) then
nextKey = companyAdapter.CompanyData.Company.Rows(0)("Number02").toString()
companyAdapter.CompanyData.Company.Rows(0).BeginEdit()
companyAdapter.CompanyData.Company.Rows(0)("Number02") += 1
companyAdapter.CompanyData.Company.Rows(0).EndEdit()
companyAdapter.Update()
companyAdapter.Dispose()
end if
'messagebox.show("nextKey = " & nextKey)
return nextKey
End Function

   Private Sub edvProject_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvProject.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
   view.dataView(args.Row)("ProjectID") = "11-A-" + GetNextKey
         End If
      End If

Dim Project As EpiDataView = CType(oTrans.EpiDataViews("Project"), EpiDataView)
Dim ProjectID As String = Project.dataView(Project.Row)("ProjectID")

if Dir("\\Location" + ProjectID) <> ("\\Location" + ProjectID) Then
   MkDir("\\Location" + ProjectID)
End if
   End Sub



IT may not be 100% correct, but get the idea.
--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> The format we want the main folder to be in is:
>
> 11-A-####
>
> 11 is the year
> A is the company
> #### is sequential
>
>
>
> ________________________________
> From: Ian <ianwhardy@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, September 1, 2011 11:42 AM
> Subject: [Vantage] Re: Performing an action after clicking save on the standard toolbar
>
> Are you using a sequential numbering system for the projects, or are you using somethign different?
>
> If you are using numbers, you could set it when you add a new row and the next number is selected (in the code).
>
> --- In vantage@yahoogroups.com, "tkoch77" <tkoch77@> wrote:
> >
> > Can anyone give me an idea of how I would execute code after I click the save button on the standard toolbar. I want to create a folder structure on one of my servers for a project after it has been saved. As of now I have a button creating the structure.
> >
> > Thanks,
> > Ted
> >
>
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
> (2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
> [Non-text portions of this message have been removed]
>




------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
Can anyone give me an idea of how I would execute code after I click the save button on the standard toolbar. I want to create a folder structure on one of my servers for a project after it has been saved. As of now I have a button creating the structure.

Thanks,
Ted
Are you using a sequential numbering system for the projects, or are you using somethign different?

If you are using numbers, you could set it when you add a new row and the next number is selected (in the code).

--- In vantage@yahoogroups.com, "tkoch77" <tkoch77@...> wrote:
>
> Can anyone give me an idea of how I would execute code after I click the save button on the standard toolbar. I want to create a folder structure on one of my servers for a project after it has been saved. As of now I have a button creating the structure.
>
> Thanks,
> Ted
>
The format we want the main folder to be in is:

11-A-####

11 is the year
A is the company
#### is sequential



________________________________
From: Ian <ianwhardy@...>
To: vantage@yahoogroups.com
Sent: Thursday, September 1, 2011 11:42 AM
Subject: [Vantage] Re: Performing an action after clicking save on the standard toolbar

Are you using a sequential numbering system for the projects, or are you using somethign different?

If you are using numbers, you could set it when you add a new row and the next number is selected (in the code).

--- In vantage@yahoogroups.com, "tkoch77" <tkoch77@...> wrote:
>
> Can anyone give me an idea of how I would execute code after I click the save button on the standard toolbar. I want to create a folder structure on one of my servers for a project after it has been saved. As of now I have a button creating the structure.
>
> Thanks,
> Ted
>




------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
If this 'A' is actually an A, then you could do the following:

Private Function GetNextKey() As String
'//Use the company Adapter to Store our sequance number Number01

Dim nextKey As String = String.Empty
Dim companyAdapter As CompanyAdapter = New CompanyAdapter(PartForm)
companyAdapter.BOConnect()
Dim company As String = PartForm.Session.CompanyID
Dim found As Boolean = companyAdapter.GetByID(company)

if (found) then
nextKey = companyAdapter.CompanyData.Company.Rows(0)("Number02").toString()
companyAdapter.CompanyData.Company.Rows(0).BeginEdit()
companyAdapter.CompanyData.Company.Rows(0)("Number02") += 1
companyAdapter.CompanyData.Company.Rows(0).EndEdit()
companyAdapter.Update()
companyAdapter.Dispose()
end if
'messagebox.show("nextKey = " & nextKey)
return nextKey
End Function

Private Sub edvProject_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvProject.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
view.dataView(args.Row)("ProjectID") = "11-A-" + GetNextKey
End If
End If

Dim Project As EpiDataView = CType(oTrans.EpiDataViews("Project"), EpiDataView)
Dim ProjectID As String = Project.dataView(Project.Row)("ProjectID")

if Dir("\\Location" + ProjectID) <> ("\\Location" + ProjectID) Then
MkDir("\\Location" + ProjectID)
End if
End Sub



IT may not be 100% correct, but get the idea.
--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> The format we want the main folder to be in is:
>
> 11-A-####
>
> 11 is the year
> A is the company
> #### is sequential
>
>
>
> ________________________________
> From: Ian <ianwhardy@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, September 1, 2011 11:42 AM
> Subject: [Vantage] Re: Performing an action after clicking save on the standard toolbar
>
> Are you using a sequential numbering system for the projects, or are you using somethign different?
>
> If you are using numbers, you could set it when you add a new row and the next number is selected (in the code).
>
> --- In vantage@yahoogroups.com, "tkoch77" <tkoch77@> wrote:
> >
> > Can anyone give me an idea of how I would execute code after I click the save button on the standard toolbar. I want to create a folder structure on one of my servers for a project after it has been saved. As of now I have a button creating the structure.
> >
> > Thanks,
> > Ted
> >
>
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
> (2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
> [Non-text portions of this message have been removed]
>