From Part Mainentance
-Add New QA Spec Record (UD04) works fine using “Add UD Table as Child” wizard.
-Add EpiUltraCombo with Simple Search to UD03 where all the QA spec values exist by Key1 categories. This works fine also on New Records
-Try to add a Event handler on that EpiUltraCombo for ValueChanged Events for when a change is made. This is where I am getting errors.
We had this working in E9 out it was written in VB and I am trying to get it written in C# for E10 enviroment.
Private Sub epiUltraComboCoreType_ValueChanged(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
Dim combo As EpiUltraCombo = CType(sender,EpiUltraCombo)
Dim selection As String = CType(combo.Value,String)
Dim recSelected As Boolean
Dim whereClause As String = ("Key1 = 'CoreType' and Key2 = '" _
+ (selection + "'"))
Dim ds As DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "UD03Adapter", recSelected, false, whereClause)
Dim dsUD03List As UD03ListDataSet = CType(ds,UD03ListDataSet)
If recSelected Then
Dim ud03row As DataRow = dsUD03List.UD03List(0)
_edvUD04.dataView(_edvUD04.Row)("Character01") = ud03row("Character01")
_edvUD04.dataView(_edvUD04.Row)("Character04") = ud03row("Character02")
End If
End Sub
C#
private void epiUltraComboC2_ValueChanged(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
EpiUltraCombo combo = (EpiUltraCombo)sender;
string selection = System.Convert.ToString(combo.Value);
bool recSelected;
//string whereClause = string.Empty;
string whereClause = "Key1 = 'TUCoreType'";
System.Data.DataSet dsUD03Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD03Adapter", out recSelected, false, whereClause);
UD03ListDataSet dsUD03List = (UD03ListDataSet)ds;
if (recSelected)
{
System.Data.DataRow adapterRow = dsUD03Adapter.Tables[0].Rows[0];
// Map Search Fields to Application Fields
EpiDataView _EdvUD04 = ((EpiDataView)(this.oTrans.EpiDataViews["UD04"]));
System.Data.DataRow _EdvUD04Row = _EdvUD04.CurrentDataRow;
if ((_EdvUD04Row != null))
{
_EdvUD04Row.BeginEdit();
_EdvUD04Row["Character01"] = adapterRow["Character01"];
_EdvUD04Row["Character02"] = adapterRow["Character02"];
_EdvUD04Row.EndEdit();
}
}
}
I keep getting “The type or namespace name ‘UD03ListDataSet’ could not be found (are you missing a using directive or an assembly reference?)” on line “UD03ListDataSet dsUD03List = (UD03ListDataSet)ds;”
even though I added the Ref assemblies for UD03. Any help is appreciated.