/// <summary>
        /// Cria as dependências dos job de impressão/cópia (foreign keys para as tabelas de usuário e impressora)
        /// </summary>
        public void CreateDataDependency()
        {
            if (jobList.Count == 0)
            {
                return;
            }

            Type      jobType          = jobList[0].GetType();
            FieldInfo userNameField    = jobType.GetField("userName");
            FieldInfo printerNameField = jobType.GetField("printerName");

            List <String> userNames    = new List <String>();
            List <String> printerNames = new List <String>();

            foreach (Object job in jobList)
            {
                String userName    = (String)userNameField.GetValue(job);
                String printerName = (String)printerNameField.GetValue(job);

                if (!userNames.Contains(userName))
                {
                    userNames.Add(userName);                                // evita duplicações
                }
                if (!printerNames.Contains(printerName))
                {
                    printerNames.Add(printerName);                                      // evita duplicações
                }
            }

            CostCenterDAO costCenterDAO  = new CostCenterDAO(sqlConnection);
            CostCenter    mainCostCenter = costCenterDAO.GetMainCostCenter(tenantId);

            mainCostCenterId = null;
            if (mainCostCenter != null)
            {
                mainCostCenterId = mainCostCenter.id;
            }

            UserDAO       userDAO = new UserDAO(sqlConnection);
            List <Object> users   = userDAO.GetAllUsers(tenantId);

            foreach (String userName in userNames)
            {
                CreateUser(userName, userDAO, users);
            }

            PrinterDAO    printerDAO = new PrinterDAO(sqlConnection);
            List <Object> printers   = printerDAO.GetAllPrinters(tenantId);

            foreach (String printerName in printerNames)
            {
                CreatePrinter(printerName, printerDAO, printers);
            }
        }
        private void CreatePrinter(String printerName, PrinterDAO printerDAO, List <Object> printers)
        {
            // Sai do método caso a impressora já exista no banco de dados
            foreach (Printer printer in printers)
            {
                if (printer.name.ToUpper() == printerName.ToUpper())
                {
                    return;
                }
            }

            Printer newPrinter = new Printer(tenantId, printerName, printerName);

            printerDAO.SetPrinter(newPrinter);
        }