private void btBuscar_Click(object sender, EventArgs e)
        {
            AmazonDynamoDBClient client = new AmazonDynamoDBClient();

            DynamoDBContext context = new DynamoDBContext(client);

            dataGridView1.DataSource = ComandoAWS.SearchDataTabelaFuncionarios(context, idFunconario.Text, nomeFuncionario.Text);

            try
            {
                if (idFunconario.Text != "" && nomeFuncionario.Text == "")
                {
                    nomeFuncionario.Text = ComandoAWS.SearchFuncionarios(context , "id", idFunconario.Text, "nome");

                }
            }

            catch
            {

            }

            idFunconario.Clear();
            nomeFuncionario.Clear();

        }
Beispiel #2
0
        private void comboBox1_DropDown(object sender, System.EventArgs e)
        {
            AmazonDynamoDBClient client  = new AmazonDynamoDBClient();
            DynamoDBContext      context = new DynamoDBContext(client);

            comboBox1.Items.Clear();

            List <Funcionarios> asList = ComandoAWS.SearchDataTabelaFuncionarios(context, "", "");

            for (int i = 0; i < asList.Count(); i++)
            {
                comboBox1.Items.Add(asList[i].nome);
            }
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            AmazonDynamoDBClient client = new AmazonDynamoDBClient();
            DynamoDBContext context = new DynamoDBContext(client);

            try
            {
                ComandoAWS.DeleteEmployer(context, idFunconario.Text, nomeFuncionario.Text);

            }

            catch
            {
                MessageBox.Show("Falha Conexão ou não existente!");
            }

            dataGridView1.DataSource = ComandoAWS.SearchDataTabelaFuncionarios(context, "", "");

        }
        private void button1_Click(object sender, EventArgs e)
        {
            AmazonDynamoDBClient client = new AmazonDynamoDBClient();

            DynamoDBContext context = new DynamoDBContext(client);

            try
            {
                ComandoAWS.AddEmployer(context, idFunconario.Text, nomeFuncionario.Text);
            }

            catch
            {
                Console.WriteLine("Erro no cadastro do Funcionario");
            }

            dataGridView1.DataSource = ComandoAWS.SearchDataTabelaFuncionarios(context, "", "");


        }