Good Afternoon, Galera
I have the routine below. I would need to streamline this routine. It takes too long to process, could anyone tell me how I could do this?
Select done in DataSet dsParam can bring more than 1 line.
DataTable dtEndereco = new DataTable();
foreach (DataRow drEnd in dsParam.Tables["Endereco"].Select(string.Format("ID = {0} AND Documento = '{1}'", drNotas["ID"].ToString(), Documento)))
{
dtEndereco.ImportRow(drEnd);
dtEndereco.Rows[l]["ID"] = int.Parse(ID_Ini) * -1;
dtEndereco.Rows[l]["Documento"] = Documento_Ini;
l++;
}