コード例 #1
0
        private List <Item> ProcessItemsFile(int retailerId, byte[] itemsFileContent, out int fixedItemsProcessed)
        {
            string stringContent = ASCIIEncoding.ASCII.GetString(itemsFileContent);

            // parse the items file received from the win service
            ItemFixed[] fixedItems = FixedFileProcessor <ItemFixed> .ProcessString(stringContent);

            fixedItemsProcessed = fixedItems.Length;
            // convert the fixed items to what we use
            List <Item> items = fixedItems.Select(fi => fi.ToDALItem(retailerId, _job, DataErrDAL)).ToList();

            return(items);
        }
コード例 #2
0
        private List <Department> ProcessDepartmentsFile(int retailerId, byte[] itemsFileContent, out int totalItems)
        {
            string stringContent = ASCIIEncoding.ASCII.GetString(itemsFileContent);

            // parse the items file received from the win service
            DepartmentFixed[] fixedItems = FixedFileProcessor <DepartmentFixed> .ProcessString(stringContent);

            totalItems = fixedItems.Length;

            // convert the fixed items to what we use
            List <Department> items = fixedItems.Select(fi => fi.ToDALDepartment(retailerId, DataErrDAL)).ToList();

            return(items);
        }