TAF: baseToolbarsManager ToolClick or execute

oTrans.Update was the trick. Over think it again.  <MoJo JoJo>Curses</MoJo JoJo>

 

Private Sub btnSave_Click(ByVal sender As Object, ByVal args As System.EventArgs)

                ' ** Place Event Handling Code Here **

                Dim edvtagView As EpiDataView = CType(oTrans.EpiDataViews("tagView"), EpiDataView)

                edvtagView.dataView(edvtagView.Row)("CountedQty") = vTotal

                oTrans.Update()

End Sub

 

Thanks for everyone’s help. Yall rock.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, May 14, 2015 2:25 PM
To: Vantage
Subject: Re: [Vantage] RE: TAF: baseToolbarsManager ToolClick or execute

 

 

You can call oTrans.Update() to "save" or oTrans.GetNew() etc... 

Also since you are using an EpiDataView you can just call Notify and it will tell the UI that a Save needs to happen so the Form will save when you change context or it will prompt you before exit.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Thu, May 14, 2015 at 3:21 PM, wking@... [vantage] <vantage@yahoogroups.com> wrote:

 

Thank you for your response, My C is extremely rusty but I don't think that it is what I am looking for. 

 

I am looking for code that will "click" the existing "Save" button.

 

I have a project that is adding  math functionality within Epicor during an inventory "Count Entry"

 

Something like 

 

Private Sub btnSave_Click(ByVal sender As Object, ByVal args As System.EventArgs)

' ** Place Event Handling Code Here **

'Dim edvtagView As EpiDataView = CType(oTrans.EpiDataViews("tagView"), EpiDataView)

'edvtagView.dataView(edvtagView.Row)("CountedQty") = vTotal

baseToolbarsManager.Tools("SaveTool").ToolClick()

End Sub

 

 

Hello

Does anyone know how to call/execute any of the toolbar options from a customization in E9? (SaveTool, ClearTool, etc)

I am looking for something like button.PerformClick() but with something like baseToolbarsManager.Tools("SaveTool ").ToolClick() or whatever.


Any ideas or help would be appreciated.

 

I have looked in the ICE documentation, but have not seen anything about methods and calls.

 

Thanks




 

Here's a snippet from a project I did on a UD table... This example also shows how to hide items, as well as add a menu item to the actions tool bar and execute code when that is clicked on.

using Infragistics.Win.UltraWinToolbars;

public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization

this.baseToolbarsManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.baseToolbarsManager_ToolClick);
// End Wizard Added Variable Initialization

// Begin Wizard Added Custom Method Calls
//this.newTool.ToolClick += new System.EventHandler(this.newTool_ToolClick);
// End Wizard Added Custom Method Calls
object obj = typeof(Epicor.Mfg.UI.App.UD25Entry.UD25Form).InvokeMember("baseToolbarsManager", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic, null, UD25Form, null);
baseToolbarsManager = (Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)obj;
//adaptUD25 = new UD25Adapter(UD25Form);
HideTools();

private void UD25Form_Load(object sender, EventArgs args)
{
// Add Event Handler Code
ButtonTool newTool = new ButtonTool("Unapproval");
//Set the properties
newTool.SharedProps.Caption = "Unapprove";
newTool.SharedProps.Enabled = true;
newTool.SharedProps.Visible = true;
newTool.SharedProps.AppearancesSmall.Appearance.Image = EpiUIImages.SmallEnabledImages.Images[EpiUIImages.IndexOf("Print")];
//first add the tool to the baseToolbarsManager
baseToolbarsManager.Tools.Add(newTool);
//add the above created tool into Standard Tools toolbar
//baseToolbarsManager.Toolbars["Standard Tools"].Tools.AddTool("Unapproval");
//add the above created tool into file menu in the Main Menu
((PopupMenuTool)baseToolbarsManager.Tools["ActionsMenu"]).
Tools.AddTool("Unapproval");
newTool.ToolClick += new ToolClickEventHandler(newTool_ToolClick);
}

private void newTool_ToolClick(object sender,ToolClickEventArgs args)
{
edvUD25.dataView[edvUD25.Row].BeginEdit();
edvUD25.dataView[edvUD25.Row]["CheckBox03"] = false;
edvUD25.dataView[edvUD25.Row]["CheckBox07"] = false;
edvUD25.dataView[edvUD25.Row]["CheckBox08"] = false;
edvUD25.dataView[edvUD25.Row]["CheckBox09"] = false;
edvUD25.dataView[edvUD25.Row]["CheckBox10"] = false;
edvUD25.dataView[edvUD25.Row]["CheckBox11"] = false;
edvUD25.dataView[edvUD25.Row].EndEdit();
edvUD25.Notify(new EpiNotifyArgs(UD25Form, edvUD25.Row, edvUD25.Column));
MessageBox.Show("When this CAR is approved, the authorization process will be re-initialized.");
}

private void baseToolbarsManager_BeforeToolDropdown(object sender, Infragistics.Win.UltraWinToolbars.BeforeToolDropdownEventArgs args)
{
}

public void HideTools()
{
if (baseToolbarsManager.Tools.Exists("NewTool"))
{
baseToolbarsManager.Tools["NewTool"].SharedProps.Enabled = false;
}
}



Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, May 14, 2015 1:39 PM
To: EPICOR UG - EPICOR (vantage@yahoogroups.com)
Subject: [Vantage] TAF: baseToolbarsManager ToolClick or execute


Hello

Does anyone know how to call/execute any of the toolbar options from a customization in E9? (SaveTool, ClearTool, etc)

I am looking for something like button.PerformClick() but with something like baseToolbarsManager.Tools("SaveTool ").ToolClick() or whatever.

Any ideas or help would be appreciated.

I have looked in the ICE documentation, but have not seen anything about methods and calls.

Thanks








[Non-text portions of this message have been removed]
1 Like
Thank you for your response, My C is extremely rusty but I don't think that it is what I am looking for. 

I am looking for code that will "click" the existing "Save" button.

I have a project that is adding  math functionality within Epicor during an inventory "Count Entry"

Something like 

Private Sub btnSave_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
'Dim edvtagView As EpiDataView = CType(oTrans.EpiDataViews("tagView"), EpiDataView)
'edvtagView.dataView(edvtagView.Row)("CountedQty") = vTotal
baseToolbarsManager.Tools("SaveTool").ToolClick()
End Sub
 
You can call oTrans.Update() to "save" or oTrans.GetNew() etc...Â
Also since you are using an EpiDataView you can just call Notify and it will tell the UI that a Save needs to happen so the Form will save when you change context or it will prompt you before exit.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, May 14, 2015 at 3:21 PM, wking@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thank you for your response, <span>My C is extremely rusty </span>but I don&#39;t think that it is what I am looking for. </p><div><br></div><div>I am looking for code that will &quot;click&quot; the existing &quot;Save&quot; button.</div><div><br></div><div><span style="word-spacing:normal;">I have a project that is adding  math functionality within Epicor during an inventory &quot;Count Entry&quot;</span><br></div><div><br></div><div>Something like </div><div><br></div><div>Private Sub btnSave_Click(ByVal sender As Object, ByVal args As System.EventArgs)</div><div><span style="white-space:pre-wrap;">		</span>&#39; ** Place Event Handling Code Here **</div><div><span style="white-space:pre-wrap;">		</span>&#39;Dim edvtagView As EpiDataView = CType(oTrans.EpiDataViews(&quot;tagView&quot;), EpiDataView)</div><div><span style="white-space:pre-wrap;">		</span>&#39;edvtagView.dataView(edvtagView.Row)(&quot;CountedQty&quot;) = vTotal</div><div><span style="white-space:pre-wrap;">		</span>baseToolbarsManager.Tools(&quot;SaveTool&quot;).ToolClick()</div><div><span style="word-spacing:normal;">End Sub</span><br></div><div> </div><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

You still need to instantiate the toolbar objects which portions of that does, after that its just <toolname>.PerformClick()

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, May 14, 2015 2:22 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: TAF: baseToolbarsManager ToolClick or execute



Thank you for your response, My C is extremely rusty but I don't think that it is what I am looking for.

I am looking for code that will "click" the existing "Save" button.

I have a project that is adding math functionality within Epicor during an inventory "Count Entry"

Something like

Private Sub btnSave_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
'Dim edvtagView As EpiDataView = CType(oTrans.EpiDataViews("tagView"), EpiDataView)
'edvtagView.dataView(edvtagView.Row)("CountedQty") = vTotal
baseToolbarsManager.Tools("SaveTool").ToolClick()
End Sub




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