Populate other Text boxes with UD fields from UltraComboBox drop down

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.

You need to bring in the UD03 references (Adapter and BO) and then add a using

using Ice.BO;

Added them, now I get error below

Error: CS0103 - line 436 (931) - The name ‘ds’ does not exist in the current context

UD03ListDataSet dsUD03List = (UD03ListDataSet)ds;

That is correct in your vb you called the variable ds but in your C# you called it dsUD03Adapter

So do I just need to replace
UD03ListDataSet dsUD03List = (UD03ListDataSet)ds;
with
UD03ListDataSet dsUD03List = dsUD03Adapter;
or just remove it completely?

You already have the latter you just need to replace ds with dsUD03Adapter in your code.

Thanks, that compiled successfully however when I test it out. I still get the Object reference error below.
Application Error

Exception caught in: App.PartEntry.PartForm.EP.Customization.JST_TEST2.CustomCode.3

Error Detail

Message: Object reference not set to an instance of an object.
Program: App.PartEntry.PartForm.EP.Customization.JST_TEST2.CustomCode.3.dll
Method: epiUltraComboC2_ValueChanged

Client Stack Trace

at Script.epiUltraComboC2_ValueChanged(Object sender, EventArgs args)
at Infragistics.Win.UltraWinGrid.UltraCombo.OnValueChanged(EventArgs e)
at Ice.Lib.Framework.EpiUltraCombo.OnValueChanged(EventArgs e)

any solution for this?