public static void FillDataSet(DataSet ds, string TableName, DataParameter[] Parametros) { if (ds == null) { ds = new DataSet(); } if (Parametros != null) { TableRequestInfo rInfo = new TableRequestInfo(); rInfo.Parameters = Parametros; Instance.remoteDataAdapter.Fill(ds, TableName, rInfo, true); } else { Instance.remoteDataAdapter.Fill(ds, new string[] { TableName }, true); } }
public static void FillDataSet(DataSet ds, string TableName, DataParameter[] Parametros) { if (ds == null) { ds = new DataSet(); } try { if (Parametros != null) { TableRequestInfo rInfo = new TableRequestInfo(); rInfo.Parameters = Parametros; Instance.remoteDataAdapter.Fill(ds, TableName, rInfo, true); } else { Instance.remoteDataAdapter.Fill(ds, new string[] { TableName }, true); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }