コード例 #1
0
        private void Btn_Inserir_Click(object sender, RoutedEventArgs e)
        {
            Projeto.ProjetoDTO p = new Projeto.ProjetoDTO();
            p.Nome = TB_Nome_Projeto.Text;
            p.Tipo = CB_Tipo_Projeto.Text;
            p.Data = TB_Data_Projeto.Text;
            p.Conta = TB_Conta_Bancaria.Text;
            if(TB_Montante_Pedido.Text != "")
                p.MontantePedido = Convert.ToInt64(TB_Montante_Pedido.Text);

            Promotor prom = new Promotor();
            prom.Nome = TB_Nome_Promotor.Text;
            prom.Nacionalidade = TB_Nacionalidade_Promotor.Text;
            p.Promotor = prom;

            Contacto cont = new Contacto();
            cont.Nome = TB_Nome_Contacto.Text;
            cont.Telefone = TB_Telefone_Contacto.Text;
            cont.Email = TB_Email_Contacto.Text;
            p.Contacto = cont;

            bool sucesso = GestorProjeto.Instance.AceitarCandidatura(p);
            if (sucesso)
            {
                Utils.createMsgBox("Candidatura inserida com sucesso.", "Inserir Candidatura", MessageBoxButton.OK, MessageBoxImage.Information);
                //Utils.clearAllTextBoxes(this);
                Homepage win = new Homepage();
                win.Left = this.Left;
                win.Top = this.Top;
                win.Show();
                this.Close();
            }
            else
                Utils.createMsgBox("Problemas a inserir a candidatura.", "Inserir Candidatura", MessageBoxButton.OK, MessageBoxImage.Error);
        }
コード例 #2
0
 private void Btn_Cancelar_Click(object sender, RoutedEventArgs e)
 {
     Homepage win = new Homepage();
     win.Left = this.Left;
     win.Top = this.Top;
     win.Show();
     this.Close();
 }
コード例 #3
0
ファイル: LoginPage.xaml.cs プロジェクト: pepipe/ISEL
 private void prosseguirComLogin()
 {
     Homepage win = new Homepage();
     win.Left = this.Left;
     win.Top = this.Top;
     win.Show();
     this.Close();
 }