Delete An Associate From The File Programatically
Tue 28 Jan 2020 - 10:51
Hi,
I need to delete an associate from the file but I'm having some trouble, can someone let me know how it's done correctly please. I've tried this...
thanks
Mike
I need to delete an associate from the file but I'm having some trouble, can someone let me know how it's done correctly please. I've tried this...
- Code:
foreach(Associate del in CurrentFile.Associates)
{
if(del.ID == Convert.ToInt64(task1.Notes))
{
CurrentFile.Associates.Remove(del.Contact);
CurrentFile.Update();
break;
}
}
- Code:
Detail: System.Data.DeletedRowInaccessibleException: Deleted row information cannot be accessed through the row. at System.Data.DataRow.BeginEditInternal() at System.Data.DataRow.set_Item(DataColumn column, Object value) at System.Data.DataRow.set_Item(String columnName, Object value) at FWBS.OMS.OMSFile.Update()
- Code:
foreach(Associate del in CurrentFile.Associates)
{
if(del.ID == Convert.ToInt64(task1.Notes))
{
del.Delete();
del.Update();
}
}
CurrentFile.Update();
thanks
Mike
Permissions in this forum:
You cannot reply to topics in this forum