public CadastroDoacaoWindow()
        {
            InitializeComponent();
            MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click       += (s, e) => ControlViews.closeRegistroDoacao();
            DateTime hoje = DateTime.Today;

            textBox_data.Text       = hoje.ToString("dd/MM/yyyy");
            textBox_nome.IsReadOnly = true;
            textBox_cpf.IsReadOnly  = true;

            ItemBD itemAction = new ItemBD();

            try
            {
                List <Item> itens = itemAction.getItensInstituicao();

                foreach (var item in itens)
                {
                    comboBox_itens.Items.Add(item.Nome);
                }
            }
            catch
            {
                comboBox_itens.Items.Add("Erro no servidor");
            }
        }
예제 #2
0
        public MensagensWindow()
        {
            InitializeComponent();
            MinimizeWindow.Click    += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click          += (s, e) => ControlViews.closeMensagens();
            textBox_dataDe.IsEnabled = false;

            MensagemBD      getMensagens = new MensagemBD();
            List <String[]> mensagens    = getMensagens.getMensagens();

            try
            {
                foreach (String[] mensagem in mensagens)
                {
                    listView_mensagens.Items.Add(new MensagensRecebidas()
                    {
                        Data = mensagem[3], IdDoador = mensagem[1], Nome = mensagem[2], Mensagem = mensagem[4]
                    });
                }
            }
            catch
            {
                MessageBox.Show("Não foi possível carregar a lista de mensagens no momento. Tente novamente mais tarde");
            }
        }
예제 #3
0
 public CheckInWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click        += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click              += (s, e) => ControlViews.closeCheckIn();
     radioButton_nenhum.IsChecked = true;
 }
 public ConsultaFuncionarioWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closeConsultaFunc();
     textBox_Busca.Opacity = 0;
 }
예제 #5
0
        public ConsultaFuncionarioDetalhesWindow(String cpf)
        {
            InitializeComponent();
            MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click       += (s, e) => ControlViews.closeConsultaFuncDetalhes();

            textBox_nome.IsReadOnly             = true;
            textBox_cpf.IsReadOnly              = true;
            textBox_rg.IsReadOnly               = true;
            textBox_dataDeNascimento.IsReadOnly = true;
            textBox_cep.IsReadOnly              = true;
            textBox_logradouro.IsReadOnly       = true;
            textBox_uf.IsReadOnly               = true;
            textBox_cidade.IsReadOnly           = true;
            textBox_bairro.IsReadOnly           = true;
            textBox_numero.IsReadOnly           = true;
            textBox_complemento.IsReadOnly      = true;
            textBox_telefoneA.IsReadOnly        = true;
            textBox_telefoneB.IsReadOnly        = true;
            textBox_email.IsReadOnly            = true;
            groupBox_status.IsHitTestVisible    = false;
            groupBox_adm.IsHitTestVisible       = false;

            FuncionarioBD dadosFunc = new FuncionarioBD();
            Funcionario   func      = new Funcionario();

            func = dadosFunc.getDadosFuncionario(cpf);

            textBox_bairro.Text           = func.Bairro;
            textBox_cep.Text              = func.Cep;
            textBox_cidade.Text           = func.Cidade;
            textBox_complemento.Text      = func.Complemento;
            textBox_cpf.Text              = func.Cpf;
            textBox_dataDeNascimento.Text = func.DataDeNascimento.ToString("dd/MM/aaaa");
            textBox_email.Text            = func.Email;
            textBox_logradouro.Text       = func.Logradouro;
            textBox_nome.Text             = func.Nome;
            textBox_numero.Text           = func.Numero;
            textBox_rg.Text        = func.Rg;
            textBox_telefoneA.Text = func.TelefoneA;
            textBox_telefoneB.Text = func.TelefoneB;
            textBox_uf.Text        = func.Uf;

            if (func.Ativo == true)
            {
                radioButton_ativo.IsChecked = true;
            }
            else
            {
                radioButton_inativo.IsChecked = true;
            }

            if (func.Adm == true)
            {
                checkBox_administrador.IsChecked = true;
            }
        }
예제 #6
0
        public MensagensMaisWindow(int idMensagem, String nome, String idDoador, String mensagem)
        {
            InitializeComponent();
            MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click       += (s, e) => ControlViews.closeMensagensMais();

            textBox_codDoador.Text  = idDoador;
            textBox_mensagem.Text   = mensagem;
            textBox_nomeDoador.Text = nome;
        }
예제 #7
0
        private void button_abrirMensagem_Click(object sender, RoutedEventArgs e)
        {
            MensagensRecebidas mensagem = new MensagensRecebidas();

            try
            {
                mensagem = (MensagensRecebidas)listView_mensagens.SelectedItem;
                ControlViews.startMensagensMais(mensagem.IdMensagem, mensagem.Nome, mensagem.IdDoador, mensagem.Mensagem);
            }
            catch
            {
                MessageBox.Show("Por favor, selecione uma mensagem!");
            }
        }
예제 #8
0
        private void button_detalhes_Click(object sender, RoutedEventArgs e)
        {
            ListaDoacoes doacoes = new ListaDoacoes();

            try
            {
                doacoes = (ListaDoacoes)listView_doacoes.SelectedItem;
                ControlViews.startCheckInMais(doacoes.CodDoacao, doacoes.Data, doacoes.Nome, doacoes.CpfCnpj, doacoes.Domicilio);
            }
            catch
            {
                MessageBox.Show("Por favor, selecione uma doação pendente!");
            }
        }
        private void button_detalhes_Click(object sender, RoutedEventArgs e)
        {
            Funcionario item = new Funcionario();

            try
            {
                item = (Funcionario)listView_funcionarios.SelectedItem;
                ControlViews.startConsultaFuncDetalhes(item.Cpf);
            }
            catch
            {
                MessageBox.Show("Por favor, selecione um funcionário");
            }
        }
예제 #10
0
        private void button_Concluir_Click(object sender, RoutedEventArgs e)
        {
            DoacaoBD doacao   = new DoacaoBD();
            Boolean  concluir = doacao.retiraPendenciaDaDoacao(Convert.ToInt32(label_codigo.Content));

            if (concluir)
            {
                MessageBox.Show("Registro de doação concluído com sucesso!");
                ControlViews.closeCheckInMais();
            }
            else
            {
                MessageBox.Show("Erro ao concluir a doação. Tente novamente mais tarde");
            }
        }
예제 #11
0
        public CheckInMaisWindow(String codigo, String data, String nome, String cpfcnpj, String domicilio)
        {
            InitializeComponent();
            MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click       += (s, e) => ControlViews.closeCheckInMais();

            textBox_cpfCnpj.Text = cpfcnpj;
            String[] dataHora = data.Split(' ');
            textBox_data.Text    = dataHora[0];
            textBox_hora.Text    = dataHora[1];
            textBox_nome.Text    = nome;
            label_codigo.Content = codigo;

            DoacaoBD        doacao     = new DoacaoBD();
            ItensDoacao     itemDoacao = new ItensDoacao();
            List <String[]> itens      = doacao.getItensDaDoacao(Convert.ToInt32(codigo));

            if (domicilio == "0")
            {
                checkBox_retiraDomicilio.IsChecked = false;
            }
            else if (domicilio == "1")
            {
                checkBox_retiraDomicilio.IsChecked = true;
            }

            try
            {
                for (int i = 0; itens.Count > i; i++)
                {
                    listView_itens.Items.Add(new ItensDoacao()
                    {
                        Nome = itens[i][0], Qtd = itens[i][1]
                    });
                }
            }
            catch
            {
                MessageBox.Show("Não foi possível carregar a lista de itens no momento. Tente novamente mais tarde");
            }
        }
예제 #12
0
 public AgendamentoDetalhes()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closeAgendamentoDetalhes();
 }
 public ItensArmazenadosWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closeEstoque();
 }
예제 #14
0
 public PropagandasWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closePropagandas();
 }
예제 #15
0
 private void button_cancelar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.voltarRegistroDoacao();
 }
예제 #16
0
 private void button_voltar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.voltarTriagem();
 }
예제 #17
0
 private void button_Voltar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.voltarMensagensMais();
 }
예제 #18
0
 public SaidaWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closeSaida();
 }
예제 #19
0
 private void button_selecionarItens_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.startItens();
 }
 private void button_cancelar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.cancelarCadastroFunc();
 }
예제 #21
0
 private void Button_detalhes_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.startAgendamentoDetalhes();
 }
 private void button_voltar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.voltarConsultaFunc();
 }
예제 #23
0
 private void Button_voltar_Click(object sender, RoutedEventArgs e)
 {
     ControlViews.voltarAgendamentoDetalhes();
 }
예제 #24
0
        public PerfilWindow()
        {
            InitializeComponent();
            MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
            CloseApp.Click       += (s, e) => ControlViews.closePerfil();

            Instituicao   instituicao = new Instituicao();
            InstituicaoBD getDados    = new InstituicaoBD();

            instituicao = getDados.getDadosInstituicao(ControlViews.cnpj);

            textBox_bairro.Text          = instituicao.Bairro;
            textBox_CEP.Text             = instituicao.Cep;
            textBox_cidade.Text          = instituicao.Cidade;
            textBox_complemento.Text     = instituicao.Complemento;
            textBox_CNPJ.Text            = ControlViews.cnpj;
            textBox_email.Text           = instituicao.Email;
            textBox_logradouro.Text      = instituicao.Logradouro;
            textBox_nomeFantasia.Text    = instituicao.NomeFantasia;
            textBox_numero.Text          = instituicao.Numero;
            textBox_razaoSocial.Text     = instituicao.RazaoSocial;
            textBox_resumoDaEmpresa.Text = instituicao.ResumoEmpresa;
            textBox_telefoneA.Text       = instituicao.TelefoneA;
            textBox_telefoneB.Text       = instituicao.TelefoneB;
            textBox_UF.Text      = instituicao.Uf;
            timePicker_das.Value = instituicao.HoraAbre;
            timePicker_ate.Value = instituicao.HoraFecha;

            if (instituicao.RetiraDoacao == true)
            {
                radioButton_retiraSim.IsChecked = true;
            }

            if (instituicao.DiasAbertos == "Segunda a Sexta")
            {
                checkBox_segunda.IsChecked = true;
                checkBox_terca.IsChecked   = true;
                checkBox_quarta.IsChecked  = true;
                checkBox_quinta.IsChecked  = true;
                checkBox_sexta.IsChecked   = true;
            }
            else if (instituicao.DiasAbertos == "Segunda a Sabado")
            {
                checkBox_segunda.IsChecked = true;
                checkBox_terca.IsChecked   = true;
                checkBox_quarta.IsChecked  = true;
                checkBox_quinta.IsChecked  = true;
                checkBox_sexta.IsChecked   = true;
                checkBox_sabado.IsChecked  = true;
            }
            else if (instituicao.DiasAbertos == "Segunda a Domingo")
            {
                checkBox_segunda.IsChecked = true;
                checkBox_terca.IsChecked   = true;
                checkBox_quarta.IsChecked  = true;
                checkBox_quinta.IsChecked  = true;
                checkBox_sexta.IsChecked   = true;
                checkBox_sabado.IsChecked  = true;
                checkBox_domingo.IsChecked = true;
            }
        }
 public CadastroFuncionarioWindow()
 {
     InitializeComponent();
     MinimizeWindow.Click += (s, e) => WindowState = WindowState.Minimized;
     CloseApp.Click       += (s, e) => ControlViews.closeCadastroFunc();
 }