Ejemplo n.º 1
0
        private void Btn_solucionar_Click(object sender, EventArgs e)
        {
            try
            {
                var ticket = new Ticket();

                ticket.ticketId     = Convert.ToInt32(dgv_TicketsFuncionarios.CurrentRow.Cells[0].Value.ToString());
                ticket.usuario      = dgv_TicketsFuncionarios.CurrentRow.Cells[1].Value.ToString();
                ticket.data         = Convert.ToDateTime(dgv_TicketsFuncionarios.CurrentRow.Cells[2].Value.ToString());
                ticket.categoria    = dgv_TicketsFuncionarios.CurrentRow.Cells[3].Value.ToString();
                ticket.software     = dgv_TicketsFuncionarios.CurrentRow.Cells[4].Value.ToString();
                ticket.prioridade   = dgv_TicketsFuncionarios.CurrentRow.Cells[5].Value.ToString();
                ticket.descricao    = dgv_TicketsFuncionarios.CurrentRow.Cells[6].Value.ToString();
                ticket.departamento = dgv_TicketsFuncionarios.CurrentRow.Cells[7].Value.ToString();
                ticket.msgErro      = dgv_TicketsFuncionarios.CurrentRow.Cells[8].Value.ToString();
                ticket.status       = dgv_TicketsFuncionarios.CurrentRow.Cells[9].Value.ToString();

                SolucionaTicket solucionaTicket = new SolucionaTicket(ticket, this, funcionario);
                solucionaTicket.Show();
                this.Hide();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Selecione um Ticket");
            }
        }
        private void Btn_detalhes_Click(object sender, EventArgs e)
        {
            var ticket = new Ticket();

            ticket.ticketId     = Convert.ToInt32(dgv_solucionados.CurrentRow.Cells[0].Value.ToString());
            ticket.usuario      = dgv_solucionados.CurrentRow.Cells[1].Value.ToString();
            ticket.data         = Convert.ToDateTime(dgv_solucionados.CurrentRow.Cells[2].Value.ToString());
            ticket.categoria    = dgv_solucionados.CurrentRow.Cells[3].Value.ToString();
            ticket.software     = dgv_solucionados.CurrentRow.Cells[4].Value.ToString();
            ticket.prioridade   = dgv_solucionados.CurrentRow.Cells[5].Value.ToString();
            ticket.descricao    = dgv_solucionados.CurrentRow.Cells[6].Value.ToString();
            ticket.departamento = dgv_solucionados.CurrentRow.Cells[7].Value.ToString();
            ticket.msgErro      = dgv_solucionados.CurrentRow.Cells[8].Value.ToString();
            ticket.status       = dgv_solucionados.CurrentRow.Cells[9].Value.ToString();
            ticket.solucao      = dgv_solucionados.CurrentRow.Cells[9].Value.ToString();

            SolucionaTicket telaDetalhesTicket = new SolucionaTicket(ticket);

            telaDetalhesTicket.Show();
        }