Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }