Пример #1
0
        private void btn_chamado_Click(object sender, EventArgs e)
        {
            retorno   = conexao.queryChamado(Convert.ToInt32(num_idChamado.Value));
            idChamado = conexao.returnId.ToString();


            Chamado_Form chamado = new Chamado_Form(Convert.ToInt32(idChamado));

            if (chamado != null)
            {
                if (Convert.ToInt32(idChamado) != 0)
                {
                    chamado.Show();
                    this.Close();
                }
            }
            else
            {
                if (idChamado == null)
                {
                    this.Close();
                }
                MessageBox.Show("Id não pode ficar vazio!");
            }
        }
        private void btn_Fechar_Click(object sender, EventArgs e)
        {
            conexao.updateFecharChamado(Convert.ToInt32(idChamado), Convert.ToInt32(idTecnico), txtSolucao.Text);
            MessageBox.Show("Chamado fechado!");
            this.Close();
            ListaDeChamados_Form listaDeChamados = new ListaDeChamados_Form();
            Chamado_Form         chamado_Form    = new Chamado_Form(Convert.ToInt32(idChamado));

            chamado_Form.Show();
        }
Пример #3
0
        private void dgChamados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int idChamado = Convert.ToInt32(dgChamados["Id chamado", e.RowIndex].Value);

            string       atual      = dgChamados.CurrentCell.ToString();
            Chamado_Form chamadoFrm = new Chamado_Form(idChamado);

            chamadoFrm.Show();
            this.Close();
        }
 private void btn_cancelar_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Cancelar fechamento do chamado?", "Confirmação",
                         MessageBoxButtons.YesNo, MessageBoxIcon.Question)
         == DialogResult.Yes)
     {
         this.Close();
         Chamado_Form chamado_Form = new Chamado_Form(Convert.ToInt32(idChamado));
         chamado_Form.Show();
     }
 }