Hi guys, here is what I have achieved so far by adopting code for E10. I am breaking my case into the small parts and trying to implement them step by step but getting this error:
"**Error: CS1501 - line 127 (254) - No overload for method 'GetRows' takes 27 arguments**"
for this part of code:
for(int x=0; x < edvJobList.dataView.Table.Rows.Count; x++)
{
JobEntryDataSet jobEntryDS = JobEntryBO.GetRows("JobNum = '" + edvJobList.dataView.Table.Rows[x]
["JobNum"].ToString() + "'" ,"","","","","","","","","","","","","","","","","","","","","","","",0,1,out morePages);
}
I do understand that something wrong with arguments for GetRows methods but after numerous tries and attempts to fix it unfortunatelly I couldnât.
If somebody knows how to fix this or whatâs the problem any help would be very much appreciated.
Thank you,
Alex
Here is the code:
// **************************************************
// Custom code for JobTravForm
// Created: 4/19/2018 4:31:39 PM
// **************************************************
extern alias Erp_Adapters_JobEntry;
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using System.IO;
using System.Collections.Generic;
using Erp.BO;
using System.Text;
using Ice.Core;
using Erp.Proxy.BO;
public class Script
{
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
private EpiDataView edvJobList;
private EpiDataView edvAsmList;
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
StringBuilder Texte = new StringBuilder();
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
edvJobList = ((EpiDataView)(this.oTrans.EpiDataViews["jobList"]));
edvAsmList = ((EpiDataView)(this.oTrans.EpiDataViews["assemblyList"]));
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
this.epiButtonC1.Click += new System.EventHandler(this.epiButtonC1_Click);
// 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
edvJobList = null;
edvAsmList = null;
this.epiButtonC1.Click -= new System.EventHandler(this.epiButtonC1_Click);
Texte = null;
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
}
private void JobTravForm_Load(object sender, EventArgs args)
{
// Add Event Handler Code
SetVersionNumber(JobTravForm);
}
private void SetVersionNumber(EpiBaseForm form)
{
string custName = oTrans.EpiBaseForm.CustomizationName;
string version = "?.?";
if ( custName.LastIndexOf("_") >= 0 )
{
version = custName.Substring(custName.LastIndexOf("_") + 1, custName.Length - custName.LastIndexOf("_") - 1);
}
form.Text = form.Text + " - Version " + version;
}
private void epiButtonC1_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
if(edvJobList.dataView.Table.Rows.Count > 0)
{
Ice.Core.Session epiSession = default(Ice.Core.Session);
epiSession = (Ice.Core.Session)JobTravForm.Session;
bool morePages = false;
JobEntryAdapter JobEntryBO = new JobEntryAdapter((Ice.Core.Session)oTrans.Session);
//Table temporaire pour filtrer les lots
DataTable tempTable = new DataTable();
tempTable.Columns.Add("JobNum", typeof(string));
tempTable.Columns.Add("PartNum",typeof(string));
tempTable.Columns.Add("FileName",typeof(string));
tempTable.Columns.Add("AsmSeq", typeof(string));
tempTable.Columns.Add("ParentPart", typeof(string));
foreach (var value in tempTable.Columns){
MessageBox.Show(value.ToString());
}
for(int x=0; x < edvJobList.dataView.Table.Rows.Count; x++){
JobEntryDataSet jobEntryDS = JobEntryBO.GetRows("JobNum = '" + edvJobList.dataView.Table.Rows[x]["JobNum"].ToString() + "'" ,"","","","","","","","","","","","","","","","","","","","","","","",0,1,out morePages);
}
}
else
{
MessageBox.Show("Test");
}
}
}