示例#1
0
        private static void PopulateSetor(GestaoTarefasIPGDbContext db)
        {
            if (db.Setor.Any())
            {
                return;
            }

            db.Setor.AddRange(
                new Setor {
                Nome = "Cantina 1", Local = "Serviços Centrais"
            },
                new Setor {
                Nome = "Cantina 2", Local = "Residências"
            },
                new Setor {
                Nome = "Erasmus", Local = "Serviços Centrais"
            },
                new Setor {
                Nome = "Bar", Local = "ESTG"
            },
                new Setor {
                Nome = "Direção", Local = "ESTG"
            },
                new Setor {
                Nome = "Secretaria", Local = "Serviços Centrais"
            },
                new Setor {
                Nome = "Laboratório de Física", Local = "ESTG"
            }
                );
            db.SaveChanges();
        }
示例#2
0
        private static void PopulateColaboradores(GestaoTarefasIPGDbContext db)
        {
            if (db.Colaboradores.Any())
            {
                return;
            }

            db.Colaboradores.AddRange(
                new Colaboradores {
                Nome = "Leonardo Costa", Profissao = "Vice-Diretor", DataNascimento = 20091999, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Hugo Amaral", Profissao = "Empregada de Limpezas", DataNascimento = 12111981, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Hugo Figueira", Profissao = "Rececionista", DataNascimento = 12121980, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Telmo Salvado", Profissao = "Diretor", DataNascimento = 15071996, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Manuel Proença", Profissao = "Secretariado", DataNascimento = 05081960, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Odete Santos", Profissao = "Empregada de Limpeza", DataNascimento = 14021958, email = "*****@*****.**"
            },
                new Colaboradores {
                Nome = "Nigel Gomez", Profissao = "Professor", DataNascimento = 13021975, email = "*****@*****.**"
            }
                );
            db.SaveChanges();
        }
示例#3
0
        private static void PopulateCargos(GestaoTarefasIPGDbContext db)
        {
            if (db.Cargos.Any())
            {
                return;
            }

            db.Cargos.AddRange(
                new Cargos {
                Nome = "Empregada de Limpeza", Superior = "Diretor"
            },
                new Cargos {
                Nome = "Professor", Superior = "Diretor"
            },
                new Cargos {
                Nome = "Secretariado", Superior = "Vice-Director"
            },
                new Cargos {
                Nome = "Tesoureiro", Superior = "Departamento de contas"
            },
                new Cargos {
                Nome = "Vice-Diretor", Superior = "Diretor"
            },
                new Cargos {
                Nome = "Diretor", Superior = "Estado"
            },
                new Cargos {
                Nome = "Rececionista", Superior = "Vice-Diretor"
            }
                );
            db.SaveChanges();
        }
 public ColaboradoresController(GestaoTarefasIPGDbContext context)
 {
     _context = context;
 }
示例#5
0
 public CargosController(GestaoTarefasIPGDbContext context)
 {
     _context = context;
 }
示例#6
0
 public static void Populate(GestaoTarefasIPGDbContext db)
 {
     PopulateSetor(db);
     PopulateCargos(db);
     PopulateColaboradores(db);
 }
示例#7
0
 public SetorsController(GestaoTarefasIPGDbContext context)
 {
     _context = context;
 }