Esempio n. 1
0
        /// <summary>
        /// Extract records from a file and insert them to the data source
        /// using the DataLinkProvider
        /// <see cref="DataLink.DataStorage.InsertRecords"/> method.
        /// </summary>
        /// <param name="fileName">The file with the source records.</param>
        public object[] InsertFromFile(string fileName)
        {
            mLastInsertedRecords = FileHelperEngine.ReadFile(fileName);
            mProvider.InsertRecords(mLastInsertedRecords);

            return(mLastInsertedRecords);
        }
Esempio n. 2
0
 /// <summary>Extract records from a file and insert them to the data source using the DataLinkProvider <see cref="DataLink.DataStorage.InsertRecords"/> method.</summary>
 /// <param name="excelFileName">The file with the source records.</param>
 /// <returns>True if the operation is successful. False otherwise.</returns>
 public bool InsertFromExcel(string excelFileName)
 {
     mLastInsertedRecords = mExcelStorage.ExtractRecords();
     mProvider.InsertRecords(mLastInsertedRecords);
     return(true);
 }