Beispiel #1
0
        public Form1()
        {
            InitializeComponent();
            Docente dc = new Docente();

            dc.SetUser("admin");
            dc.SetPass("1234");

            dc.SetNome("Administrador");
            RD.GetListaPessoa().Add(dc);

            Aluno al = new Aluno();

            al.SetUser("aluno");
            al.SetPass("aluno");

            al.SetNome("Aluno");
            RD.GetListaPessoa().Add(al);

            OrientadorEmpresa oe = new OrientadorEmpresa();

            oe.SetUser("orientador");
            oe.SetPass("orientador");

            oe.SetNome("Orientador");
            RD.GetListaPessoa().Add(oe);

            Empresa e = new Empresa();

            e.SetUser("empresa");
            e.SetPass("empresa");

            e.SetNome("Empresa");
            RD.GetListaEmpresa().Add(e);
        }
Beispiel #2
0
        private void bt_Guardar_Click_1(object sender, EventArgs e)
        {
            DialogResult      adicionar = MessageBox.Show("Tem a certeza que pretende adicionar?", "Adicionar Orientador", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            OrientadorEmpresa OE        = new OrientadorEmpresa();

            OE.SetNome(txt_nome.Text);
            OE.SetNumOrientador(Convert.ToInt32(txt_NumeroOrientador.Text));
            OE.GetContacto().SetTelefone(Convert.ToInt32(txt_Telefone.Text));
            OE.GetContacto().SetEmail(txt_Email.Text);
            if (rb_Masculino.Checked == true)
            {
                OE.SetGenero("Masculino");
            }
            else
            {
                if (rb_Feminino.Checked == true)
                {
                    OE.SetGenero("Feminino");
                }
            }
            string n_imagem = path + "foto_OrientadorEmpresa_" + OE.GetNome() + ".jpg";

            OE.SetFoto("foto_OrientadorEmpresa_" + OE.GetNome() + ".jpg");
            ptb_foto.Image.Save(n_imagem);

            RE.GetListaOrientadoresEmpresa().Add(OE);

            this.Close();
        }