コード例 #1
0
        private void dgStatus_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                txtIDStatus.Text       = dgStatus.Rows[e.RowIndex].Cells[0].Value.ToString();
                txtStatus.Text         = dgStatus.Rows[e.RowIndex].Cells[1].Value.ToString();
                txtQtdeTentativas.Text = dgStatus.Rows[e.RowIndex].Cells[3].Value.ToString();
                txtHoraRetorno.Text    = dgStatus.Rows[e.RowIndex].Cells[4].Value.ToString();

                acaoCTL CAcao   = new acaoCTL();
                string  sIDAcao = CAcao.RetornarIDAcao(dgStatus.Rows[e.RowIndex].Cells[2].Value.ToString());
                comboAcao.SelectedValue = sIDAcao;

                if (txtIDStatus.Text != "")
                {
                    cmdSalvar.Enabled         = true;
                    comboAcao.Enabled         = false;
                    txtStatus.Enabled         = false;
                    txtHoraRetorno.Enabled    = true;
                    txtQtdeTentativas.Enabled = true;
                    radNao.Enabled            = true;
                    radSim.Enabled            = true;
                }
                else
                {
                    cmdSalvar.Enabled         = false;
                    comboAcao.Enabled         = false;
                    txtStatus.Enabled         = false;
                    txtHoraRetorno.Enabled    = false;
                    txtQtdeTentativas.Enabled = false;
                    radNao.Enabled            = false;
                    radSim.Enabled            = false;
                }

                //Ativo
                if (dgStatus.Rows[e.RowIndex].Cells[5].Value.ToString() == "Sim")
                {
                    radSim.Checked = true;
                    radNao.Checked = false;
                }
                else
                {
                    radSim.Checked = false;
                    radNao.Checked = true;
                }
            }
        }
コード例 #2
0
    private void CarregarAcoes()
    {
        acaoCTL CAcao = new acaoCTL();

        CAcao.PreencherDrop_Acao(dropAcao);
    }
コード例 #3
0
        private void CarregarAcoes()
        {
            acaoCTL CAcao = new acaoCTL();

            CAcao.PreencherComboBox_Acao(comboAcao);
        }