Ejemplo n.º 1
0
 public bool Upload(string strFileName, int iClass)
 {
     ExcelDataAccess exceldataaccess = new ExcelDataAccess();
     DataSet ds = (DataSet)exceldataaccess.GetDataSetFromExcel(strFileName);
     foreach (DataRow dr in ds.Tables[0].Rows)
     {
         InsertIntoTempTable(iClass, ds.Tables[0].Columns, dr);
     }
     return true;
 }
 public int Upload(string strFileName)
 {
     ExcelDataAccess exceldataaccess = new ExcelDataAccess();
     DataSet ds = (DataSet)exceldataaccess.GetDataSetFromExcel(strFileName);
     int iBatchID = GetBatchID();
     foreach (DataRow dr in ds.Tables[0].Rows)
     {
         InsertIntoTempTable(iBatchID, ds.Tables[0].Columns, dr);
     }
     return ValidateUpload(iBatchID);
 }