Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            idCliente = int.Parse(listView1.SelectedItems[0].SubItems[0].Text);
            ControleFuncionario cf = new ControleFuncionario();

            cf.DeletarFunc(idCliente);
            LimparCampos();
            PreencherListView();
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            idCliente = int.Parse(listView1.SelectedItems[0].SubItems[0].Text);
            ControleFuncionario cf = new ControleFuncionario();
            SqlDataReader       dr = cf.RetornarFuncionarios(idCliente);

            if (dr != null)
            {
                while (dr.Read())
                {
                    textBox1.Text       = dr.GetString(1);
                    maskedTextBox1.Text = dr.GetString(2);
                    textBox3.Text       = dr.GetString(3);
                    maskedTextBox2.Text = dr.GetString(4);
                    comboBox1.Text      = dr.GetString(5);
                }
            }
            cf.DeletarFunc(idCliente);
            PreencherListView();
        }