Ejemplo n.º 1
0
        //Starts the import of data when import is clicked
        public void InitializeImport(string masterDataFilepath, string routeNumberFilepath)
        {
            CSVImport csvImport = new CSVImport();

            //only import from excel file if database is empty and there are excel files to import
            if (masterDataFilepath != null || routeNumberFilepath != null)
            {
                //Import data from excel files
                csvImport.ImportContractors(masterDataFilepath);
                csvImport.ImportRouteNumbers();
                csvImport.ImportOffers(routeNumberFilepath);
            }
            //Import data from database
            contractorList  = csvImport.SendContractorListToListContainer();
            routeNumberList = csvImport.SendRouteNumberListToListContainer();
            ListContainer listContainer = ListContainer.GetInstance();

            listContainer.GetLists(routeNumberList, contractorList);
        }