Back to Browse

Epicor Dashboard Creation Part 2

7.6K views
Jun 9, 2015
1:06:27

Epicor Dashboard Creation from the 6/4/2015 Minnesota Epicor User Group meeting. See Part 1 here https://youtu.be/YyuTNXh2v88 The Code: // ************************************************** // Custom code for MainController // Created: 6/4/2015 1:36:05 PM // ************************************************** using System; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Windows.Forms; using Epicor.Mfg.BO; using Epicor.Mfg.UI; using Epicor.Mfg.UI.Adapters; using Epicor.Mfg.UI.Customization; using Epicor.Mfg.UI.ExtendedProps; using Epicor.Mfg.UI.FormFunctions; using Epicor.Mfg.UI.FrameWork; using Epicor.Mfg.UI.Searches; public class Script { // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! ** // Begin Wizard Added Module Level Variables ** // End Wizard Added Module Level Variables ** // Add Custom Module Level Variables Here ** DynamicQueryAdapter dqAdapter; EpiDataView epiDataView; public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines ** // Begin Wizard Added Variable Initialization // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls this.tbDescription.TextChanged += new System.EventHandler(this.tbDescription_TextChanged); // End Wizard Added Custom Method Calls } public void DestroyCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines ** // Begin Wizard Added Object Disposal this.tbDescription.TextChanged -= new System.EventHandler(this.tbDescription_TextChanged); // End Wizard Added Object Disposal // Begin Custom Code Disposal // End Custom Code Disposal } private void MainController_Load(object sender, EventArgs args) { // Add Event Handler Code createAdapterView(); dqAdapter.ExecuteDashboardQuery(dqAdapter.RuntimeQuery); } void createAdapterView() { // create the new instance of the DynamicQuery Adapter and connect dqAdapter = new DynamicQueryAdapter(oTrans); dqAdapter.BOConnect(); // get the BAQ by ID if (!dqAdapter.GetDashboardQuery("EPIC03-eugpart")) return; String viewName = "ItemListView"; // create the local EpiDataView and bind it to our BAQ Data epiDataView = new EpiDataView(); epiDataView.dataView = new DataView(dqAdapter.QueryResults.Tables["Results"]); oTrans.Add(viewName , epiDataView); // bind the Grid to the Query and pass the Transaction to wire up the EpiMagic grdItemList.EpiBinding = viewName; grdItemList.EpiTransaction = oTrans; } void setFilter() { string filterString = "Part.PartDescription LIKE '*" + tbDescription.Text + "*' "; epiDataView.dataView.RowFilter = filterString; } private void tbDescription_TextChanged(object sender, System.EventArgs args) { // ** Place Event Handling Code Here ** setFilter(); } }

Download

0 formats

No download links available.

Epicor Dashboard Creation Part 2 | NatokHD