private void encaminhar_Atendimento()
        {
            Categoria_Atendimento    categoria    = new Categoria_Atendimento();
            Subcategoria_Atendimento subcategoria = new Subcategoria_Atendimento();



            categoria.Cate_ID   = categoria_statico.Cate_ID;
            subcategoria.Sub_ID = subcategoria_statico.Sub_ID;
            var hora_encaminhado = DateTime.Now.ToString("HH:mm:ss");
            var descricao        = "";

            atendimento_statico.categoria    = categoria;
            atendimento_statico.subcategoria = subcategoria;
            atendimento_statico.helpdesk     = helpdesk_alvo;
            int acao = 0;

            descricao = "Atendimento reencaminhado de : { " + frm_HelpDesk.help_atendimento.help_Nome + " } para: { " + cb_helpDesk.Text + " } as: " + hora_encaminhado + " \r\n " + cx_ac_obs.Text;
            atendimento_statico.Atend_descricao = descricao;

            if (atendimento_Solicitado == true)
            {
                acao = regra_atendimento.upt_atendimento_help(atendimento_statico);
                limpa_DAdos();
                acao_atendimento(acao);
                this.Close();
            }
            else
            {
                var data_solicitadao = DateTime.Now.Date.ToString("yyyy-MM-dd");
                atendimento_statico.Atend_data_solicitado = data_solicitadao;
                acao = regra_atendimento.solicitar_atendimento_helpdesk(atendimento_statico);
                limpa_DAdos();
                acao_atendimento(acao);
                this.Close();
            }
        }
Esempio n. 2
0
        private void informa_dados_grid(DataGridView dg)
        {
            bt_finalizar.Enabled = false;
            bt_cancelar.Enabled  = false;
            cx_dataHora.Text     = "";
            cx_provedor.Text     = "";
            cx_solicitado.Text   = "";
            cx_codCliente.Text   = "";
            cx_nomeCliente.Text  = "";
            cx_help.Text         = "";
            cx_categoria.Text    = "";
            cx_Subcategoria.Text = "";
            cx_obs.Text          = "";

            Cliente cliente = new Cliente();
            Subcategoria_Atendimento subcategoria = new Subcategoria_Atendimento();
            Categoria_Atendimento    categoria    = new Categoria_Atendimento();
            RecepcaoVendedor         recepcao     = new RecepcaoVendedor();

            atendimento.Aten_ID = 0;
            try { atendimento.Aten_ID = Convert.ToInt32(dg.SelectedCells[0].Value.ToString()); }
            catch { atendimento.Aten_ID = 0; }


            if (atendimento.Aten_ID > 0)
            {
                string data = "";
                cx_codCliente.Text   = dg.SelectedCells[1].Value.ToString();
                cx_nomeCliente.Text  = dg.SelectedCells[2].Value.ToString();
                cx_categoria.Text    = dg.SelectedCells[3].Value.ToString();
                cx_Subcategoria.Text = dg.SelectedCells[4].Value.ToString();
                lbl_prioridade.Text  = dg.SelectedCells[5].Value.ToString();
                try
                {
                    data = Convert.ToDateTime(dg.SelectedCells[6].Value).ToString("dd/MM/yyyy");
                }
                catch { data = DateTime.Now.ToString("dd/MM/yyyy"); }
                cx_dataHora.Text    = data;
                cx_help.Text        = dg.SelectedCells[8].Value.ToString();
                cx_solicitado.Text  = dg.SelectedCells[9].Value.ToString();
                categoria.Cate_ID   = Convert.ToInt32(dg.SelectedCells[10].Value.ToString());
                subcategoria.Sub_ID = Convert.ToInt32(dg.SelectedCells[11].Value.ToString());
                cx_provedor.Text    = dg.SelectedCells[12].Value.ToString();
                cx_obs.Text         = dg.SelectedCells[14].Value.ToString();

                //Trata pioridade 0=Baixa | 1 = média | 2 Alta
                if (lbl_prioridade.Text == "BAIXA")
                {
                    img_prioridade.Image = Properties.Resources.verde_25x25;
                }
                else if (lbl_prioridade.Text == "MÉDIA")
                {
                    img_prioridade.Image = Properties.Resources.amarelo_25x25;
                }
                else if (lbl_prioridade.Text == "ALTA")
                {
                    img_prioridade.Image = Properties.Resources.vermelho_25x25;
                }
                else
                {
                    img_prioridade.Image = Properties.Resources.verde_25x25; lbl_prioridade.Text = "Baixo";
                }

                bt_finalizar.Enabled = true;
                bt_cancelar.Enabled  = true;
            }
            else
            {
                bt_finalizar.Enabled = false;
                bt_cancelar.Enabled  = false;
                cx_dataHora.Text     = "";
                cx_provedor.Text     = "";
                cx_solicitado.Text   = "";
                cx_codCliente.Text   = "";
                cx_nomeCliente.Text  = "";
                cx_help.Text         = "";
                cx_categoria.Text    = "";
                cx_Subcategoria.Text = "";
                cx_obs.Text          = "";
            }
        }