Esempio n. 1
0
        public async Task populaCampos(int FormularioId, string status)
        {
            disabilitaCamposReabertura(status);
            await carregaParceiroOfensor();
            await carregaPendente(null);

            Questao7Bll questao7Bll = new Questao7Bll();
            var         q           = await questao7Bll.readAsync(FormularioId);

            if (q != null)
            {
                ViewState["idQuestao"]    = q.id;
                this.ExclusaoNegativa     = q.ExclusaoNegativacao;
                this.CoprrecaoCobranca    = q.CorrecaoCobrancaIndevida;
                this.CancelamentoIsencao  = q.CancelamentoIsencao;
                this.CancelamentoCobranca = q.CancelamentoCobranca;
                this.ReclamacaoCliente    = q.ReclamacaoCliente;
                this.ParceiroOfensor      = q.parceiroOfensorId;
                this.ConsideracoesFinais  = q.ConsideracoesFinais;
                this.SolucaoProblemas     = q.SolucaoProblemas;
                this.Fechamento           = q.Fechamento;
                this.Pendente             = q.Pendente.Split(',').ToList <string>(); // ToList();

                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "p7", "preenchePendente_7();", true);
            }
        }
Esempio n. 2
0
        public string[] Get(int id_caso, int questao)
        {
            string[] pendente = null;
            string   ret;

            if (questao == 7)
            {
                Questao7Bll q = new Questao7Bll();
                ret = q.readPendente(id_caso);
                if (!String.IsNullOrEmpty(ret))
                {
                    pendente = ret.Split(',');
                }

                return(pendente);
            }
            else if (questao == 3)
            {
                Questao3BLL q = new Questao3BLL();
                ret = q.readPendente(id_caso);
                if (!String.IsNullOrEmpty(ret))
                {
                    pendente = ret.Split(',');
                }

                return(pendente);
            }

            return(null);
        }
Esempio n. 3
0
        public void Salvar(int FormularioId)
        {
            try
            {
                if (FormularioId > 0)
                {
                    Questao7Bll questao7Bll = new Questao7Bll();
                    Questao7    q           = new Questao7();

                    q.id                       = Convert.ToInt32(ViewState["idQuestao"]);
                    q.formularioId             = FormularioId;
                    q.ExclusaoNegativacao      = cbExclusaoNegaticao.Checked;
                    q.CorrecaoCobrancaIndevida = cbCorrecaoCobrancaIndevida.Checked;
                    q.CancelamentoIsencao      = cbCancelamentoIsencao.Checked;
                    q.CancelamentoCobranca     = cbCancelamentoCobranca.Checked;
                    if (ddlReclamacao.SelectedValue != "0")
                    {
                        q.ReclamacaoCliente = Convert.ToInt32(ddlReclamacao.SelectedValue);
                    }
                    else
                    {
                        q.ReclamacaoCliente = null;
                    }
                    if (ddlParceiroOfensor.SelectedValue != "0")
                    {
                        q.parceiroOfensorId = Convert.ToInt32(ddlParceiroOfensor.SelectedValue);
                    }
                    else
                    {
                        q.parceiroOfensorId = null;
                    }
                    q.ConsideracoesFinais = txtConsideracoesFinais.Text.TrimEnd();
                    q.SolucaoProblemas    = txtSolucaoProblema.Text.TrimEnd();
                    if (ddlFechamento.SelectedValue != "0")
                    {
                        q.Fechamento = Convert.ToInt32(ddlFechamento.SelectedValue);
                    }
                    else
                    {
                        q.Fechamento = null;
                    }

                    q.Pendente      = "";
                    q.PendenteValor = "";
                    foreach (ListItem item in lbPendente.Items)
                    {
                        if (item.Selected)
                        {
                            q.Pendente      += item.Text.ToString() + ","; //+ item.Value + "\\n";
                            q.PendenteValor += item.Value.ToString() + ",";
                        }
                    }

                    if (q.Pendente.EndsWith(","))
                    {
                        q.Pendente = q.Pendente.Remove(q.Pendente.Length - 1, 1);
                    }

                    if (q.PendenteValor.EndsWith(","))
                    {
                        q.PendenteValor = q.PendenteValor.Remove(q.PendenteValor.Length - 1, 1);
                    }

                    questao7Bll.save(q);
                    ViewState["idQuestao"] = q.id;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }