private AcukwikDataSet.AcukwikFBOHandlerDetailDataTable ConvertTable(DataSheetCollection supportedSheetCollection, DataTable uploadedSheetTable) { AcukwikDataSet.AcukwikFBOHandlerDetailDataTable result = null; foreach (DataSheet supportedDataSheet in supportedSheetCollection) { result = AttemptToConvertFormat(supportedDataSheet, uploadedSheetTable); if (result != null && result.Rows.Count > 0) { return(result); } } return(null); }
public bool IsConvertSuccessful(DataSheetCollection supportedSheetCollection, DataTable uploadedSheetTable) { AcukwikDataSet.AcukwikFBOHandlerDetailDataTable convertedTable = ConvertTable(supportedSheetCollection, uploadedSheetTable); if (convertedTable == null) { return(false); } UploadDatabaseRecords(convertedTable); if (convertedTable.Rows.Count == 0) { return(false); } return(true); }
private AcukwikDataSet.AcukwikFBOHandlerDetailDataTable AttemptToConvertFormat(DataSheet supportedDataSheet, DataTable uploadedSheetTable) { AcukwikDataSet.AcukwikFBOHandlerDetailDataTable result = new AcukwikDataSet.AcukwikFBOHandlerDetailDataTable(); try { if (!supportedDataSheet.PopulateRowsFromData(result, uploadedSheetTable)) { return(null); } } catch (Exception exception) { throw new Exception(exception.ToString()); } return(result); }