oTrans.Refresh() getting the error?

Dear Team,

I’m trying to refresh the part form once the revision is deleted from the last to first (one by one). I’m getting the error message like Index 0 is either one or more row count. but the revision is deleted from the part. kindly help on this issue. I’m using the After Adapter Method. I commented on the oTrans.Refresh() method and used the other format also.

The below custom code is used for your reference.

private void oTrans_adapter_AfterAdapterMethod(object sender, AfterAdapterMethodArgs args)
{
// ** Argument Properties and Uses **
// ** args.MethodName **
// ** Add Event Handler Code **

	// ** Use MessageBox to find adapter method name
	// EpiMessageBox.Show(args.MethodName);
	switch (args.MethodName)
	{
		case "GetByID":
			Ice.Lib.Framework.EpiCombo epiCmbItemGrp = (Ice.Lib.Framework.EpiCombo)csm.GetNativeControlReference("e405d5e7-d88d-4237-93fe-de6bfa1a0eb1");
			Ice.Lib.Framework.EpiCombo epiCmbItemSubGrp = (Ice.Lib.Framework.EpiCombo)csm.GetNativeControlReference("30594709-129e-4951-abe0-37a8ea602d90");
					
			epiCmbItemGrp.IsEpiReadOnly = true;
			epiCmbItemSubGrp.IsEpiReadOnly = true;					
		break;			
		case "GetNewPart":
			CreateRowRulePartItem_Group_cEquals_Empty();				
		break;
		case "Update": 
			Ice.Lib.Framework.EpiCombo epi_CmbItemGrp = (Ice.Lib.Framework.EpiCombo)csm.GetNativeControlReference("e405d5e7-d88d-4237-93fe-de6bfa1a0eb1");
			Ice.Lib.Framework.EpiCombo epi_CmbItemSubGrp = (Ice.Lib.Framework.EpiCombo)csm.GetNativeControlReference("30594709-129e-4951-abe0-37a8ea602d90");
					
			epi_CmbItemGrp.IsEpiReadOnly = true;
			epi_CmbItemSubGrp.IsEpiReadOnly = true; 

		break;
		case "Delete":
			//oTrans_adapter.Refresh();					
			//oTrans_adapter.GetByID("10020002");
			//oTrans.GetBaseDefault();
						
			
			Ice.Lib.Framework.EpiTextBox tmpPartNo = (Ice.Lib.Framework.EpiTextBox)csm.GetNativeControlReference("38e1671b-0c3f-4ab3-b8ab-95f26285f1d2");
			string PartNo = string.Empty;
			PartNo =  tmpPartNo.Text.ToString();
			
			oTrans.ClearDataSets();
		
			EpiDataView edvPart = ((EpiDataView)(this.oTrans.EpiDataViews["Part"]));
			this.edvPart.Notify(new EpiNotifyArgs(this.oTrans, this.edvPart.Row, this.edvPart.Column));

			oTrans_adapter.GetByID(PartNo);

			//EpiDataView _partForm = (EpiDataView)(oTrans.EpiDataViews["Part"]);
			//String _partFormView = _partForm.dataView[_partForm.Row]["PartNum"];

			//  Or 
			// DataView [dvVarName] = [edvVarName].dataView;
			// String [VarName] = [dvVarName][[edvVarName].Row]["PartNum"];

			
			

			//PartAdapter tmpPartAdapter  = new PartAdapter(this.oTrans);
			//tmpPartAdapter.BOConnect();
			
			//tmpPartAdapter.PartExists(PartNo);
			//tmpPartAdapter.Dispose();

			// oTrans.Refresh();
			//oTrans.GetByID(PartNo);
		break;
	}
}