Problems loading a modal modal pop up with custom 404 error

Asked

Viewed 84 times

0

Hello I generated some error pages in my application in mvc, however I realized that this giving error when I try to load a modal, instead of it load my modal it loads the page of error 404 follow my codes

protected void Application_Error(object sender, EventArgs e)
       {
           Exception exception = Server.GetLastError();
           Response.Clear();

           HttpException httpException = exception as HttpException;

           int error = httpException != null ? httpException.GetHttpCode() : 0;

           Server.ClearError();
           Response.Redirect(String.Format("~/Error/?error={0}", error, exception.Message));
       }

error controller:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using macpartner.Models;

namespace macpartner.Controllers
{
    public class ErrorController : Controller
    {
        private MacPartnerContext db = new MacPartnerContext();
        // GET: Error
        public ActionResult Index(int error = 0)
        {
            switch (error)
            {
                case 500:
                    ViewBag.Imagem = "https://i.imgur.com/JUtjbnQ.png";
                    break;

                case 404:
                    ViewBag.Imagem = "https://i.imgur.com/6hW4WwF.png";
                    break;

                default:
                    ViewBag.Imagem = "https://i.imgur.com/nBbSpyD.png";
                    break;
            }

            return View("~/views/error/_ErrorPage.cshtml");
        }
    }
}

page with modal:

       @model IEnumerable<macpartner.Models.LeadCashBack>

    @{
        ViewBag.Title = "Meus Bônus";
    }

    @section Scripts{




        <script>
            $(function () {
                $("#PontosDisponiveis").click(function () {

                    var id = $(this).attr("data-id");
                    $("#modalBonusDisponiveis").load("Details?id=" + id, function () {
                        $("#modalBonusDisponiveis").modal();
                    })

                 });

        </script>
    <script type="text/javascript">

             $("#BtnResgataValor").click(function () {

                 if ($('#hasContaBancaria').text() == "True") {



                     location.href = '@Url.Action("ResgataBonusAsync", "LeadCashBacks")';

                     swal({
                         title: "Pronto!",
                         text: "Solicitação confirmada, agora é só esperar o pessoal da Manchester depositar a grana pra você ;)",
                         icon: "success",
                         button: "Entendi!",
                     });
                 }
                 else {

                     swal({
                         title: "Ops!",
                         text: "Antes de solicitar o resgate dos seus bonus é necessário cadastrar seus dados bancários. Tô te direcionando...",
                         icon: "warning",
                     });

                     setTimeout(
                         function () {
                             location.href = '@Url.Action("Create", "UserDadosBancarios")';
                         }, 7000);


                 }


             });

    </script>

    }


@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    decimal TotalValor = 0;
    decimal ValoresDisponiveis = 0;
    decimal ValoresUtilizados = 0;
    var hasContaBancaria = false;

    macpartner.Models.MacPartnerContext db = new macpartner.Models.MacPartnerContext();
    macpartner.Models.User user = new macpartner.Models.User();
    user = db.Users.Where(u => u.UserName == User.Identity.Name).First();
    var userDadosBancarios = db.UserDadosBancarios.Where(u => u.UserId == user.UserId).ToList();

    if (userDadosBancarios.Count > 0)
    {
        hasContaBancaria = true;
    }
    else
    {
        hasContaBancaria = false;
    }

    foreach (var item in Model)
    {
        if (!item.Contemplado)
        {
            ValoresDisponiveis += item.ValorProdutos + item.ValorServicos;
        }
        else
        {
            ValoresUtilizados += item.ValorProdutos + item.ValorServicos;
        }

        TotalValor += item.ValorProdutos + item.ValorServicos;
    }
}

<div class="jumbotron">
    <img class="banner_full" src="https://i.imgur.com/0acNo2Y.png" />
    <img class="banner_reduzido" src="~/Content/Resources/bonus_reduzido.png" />
</div>

<div class="MyContent" style="margin-top:-40px">

    <h4>Resumo de Bonus</h4>

    <center>
        <div class="MyHeaderContent">
            <table class="table-bordered">
                <thead>

                </thead>
                <tbody>
                    <tr>
                        <td>
                            <div class="MyDashboardDiv" id="PontosDisponiveis">
                                <center><h4>Bônus Disponíveis</h4></center>
                                <center><h3 class="count">@ValoresDisponiveis</h3></center>
                            </div>
                        </td>
                        <td>

    <div class="modal fade" id="modalBonusDisponiveis">
        <p id="hasContaBancaria" hidden>@hasContaBancaria</p>
        <div class="modal-dialog" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
                    <h4 class="modal-title">Bônus Disponíveis</h4>
                </div>
                <div class="modal-body">
                    <h4>Extrato de Bônus Disponíveis</h4>
                    <div>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="MyTh">
                                        <h5>Nome Fantasia</h5>
                                    </th>

                                    <th class="MyTh">
                                        <h5>Documento</h5>
                                    </th>

                                    <th class="MyTh">
                                        <h5>Total Produtos</h5>
                                    </th>

                                    <th class="MyTh">
                                        <h5>Total Serviços</h5>
                                    </th>

                                    <th class="MyTh">
                                        <h5>CashBack Produtos</h5>
                                    </th>

                                    <th class="MyTh">
                                        <h5>CashBack Servicos</h5>
                                    </th>
                                </tr>
                            </thead>
                            @foreach (var item in Model)
                            {
                                macpartner.Models.Lead lead = macpartner.Helpers.LeadHelper.LeadPontosById(item.LeadId);

                                if (!item.Contemplado)
                                {
                                    <tbody>
                                        <tr>
                                            <td class="MyTrTd">
                                                <h5>@lead.fantasia</h5>
                                            </td>

                                            <td class="MyTrTd">
                                                <h5>@lead.cnpj_cpf</h5>
                                            </td>

                                            <td class="MyTrTd">
                                                <h5>R$ @lead.ValorProdutos</h5>
                                            </td>

                                            <td class="MyTrTd">
                                                <h5>R$ @lead.ValorServicos</h5>
                                            </td>

                                            <td class="MyTrTd">
                                                <h5>R$ @item.ValorProdutos</h5>
                                            </td>

                                            <td class="MyTrTd">
                                                <h5>@item.ValorServicos</h5>
                                            </td>
                                        </tr>
                                    </tbody>
                                }
                            }
                        </table>
                    </div>
                </div>
                <div class="modal-footer">

                    <button type="button" class="btn btn-info" data-dismiss="modal">Fechar</button>

                    @if (ValoresDisponiveis > 0)
                    {
                        <button type="button" class="has-load btn btn-success" id="BtnResgataValor">Resgatar Valor</button>
                    }

                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

modal controller

 [Authorize(Roles = "Admin, Parceiro")]

        public async Task<ActionResult> ResgataBonusAsync()
        {
            user = db.Users.Where(u => u.UserName == User.Identity.Name).First();
            var userDadosBancarios = db.UserDadosBancarios.Where(u => u.UserId == user.UserId).ToList();

            if (userDadosBancarios.Count > 0)
            {
                var db2 = new MacPartnerContext();

                var leadsCashBack = db2.LeadCashBacks.Where(l => l.Contemplado == false && l.UserId == user.UserId);

                decimal totalCashBack = 0;
                foreach (var item in leadsCashBack)
                {
                    totalCashBack += (item.ValorProdutos + item.ValorServicos);
                }

                //Configura objeto de lote
                var lote = SeparaLote(leadsCashBack);
                lote.UserId = user.UserId;
                await LeadHelper.AddLeadCashBackLoteAsync(leadsCashBack, lote);
                var loteId = LeadHelper.loteId;

                //altera status do lote
                db2.Database.ExecuteSqlCommand("UPDATE dbo.LeadCashBacks SET Contemplado = '1' WHERE UserId = " + user.UserId);
                await db2.SaveChangesAsync();

                //Configurações e-mail de resgate de bonus
                var parceiro = user.FirstName + " " + user.LastName + " (" + user.UserName + ")";
                var callbackUrl = Url.Action("Edit/"+loteId, "LeadCashBackLotes", null, protocol: Request.Url.Scheme);
                user = db.Users.Where(u => u.UserId == user.UserId).FirstOrDefault();

                var body = macpartner.Resources.solicitacaoDeResgateBody;
                body = body.Replace("[financeiro]", "Cida");
                body = body.Replace("[parceiro]", parceiro);
                body = body.Replace("[total]", totalCashBack.ToString());
                body = body.Replace("[banco]", userDadosBancarios[0].Banco);
                body = body.Replace("[agencia]", userDadosBancarios[0].Agencia);
                body = body.Replace("[conta]", userDadosBancarios[0].Conta);
                body = body.Replace("[tipo]", userDadosBancarios[0].Tipo);
                body = body.Replace("[nome-favorecido]", userDadosBancarios[0].Nome);
                body = body.Replace("[documento-favorecido]", userDadosBancarios[0].Documento);
                body = body.Replace("[celular-favorecido]", userDadosBancarios[0].Celular);
                body = body.Replace("[link]", callbackUrl);

                var userFinanceiro = db.Users.Where(u => u.Financeiro).FirstOrDefault();

                await MailHelper.SendMail(userFinanceiro.UserName, "IndicaMais - Solicitação de Resgate de Bonus", body);
            }
            else
            {
                return RedirectToAction("Create", "UserDadosBancarios");
            }

            return RedirectToAction("Index");
        }
  • Maybe because the path is actually wrong... you’ve checked the url you’re trying to access when you try to do the load('Details?id=...'

  • So when I leave disabled the error 404 it loads the page, only when it is enabled

  • tries to reduce a little the code of your question, present only what is relevant to the diagnosis and reproduction of the problem, a [MCVE]. The way it is it gets a little confusing to understand.

  • I only let the modal that has to load, but this web page uses 3 modal

  • Where is the Details Action, debugging, when it enters the error controller?

  • In case Details is not in the controler, it loads the java script

  • But you need to answer that route, no?

  • The page pulls the id of the java script, it does not have a view page created in the views, it is to load the index

  • I understood what you meant, I made the custom error, another programmer made the modal, I will need to create a view to be treated in error 404, before the custom it works for this reason

Show 4 more comments

1 answer

0


I found the bug, as @Leandro Angelo said the java script was trying to load an id from a controller

Follows the correction of the code:

   @model IEnumerable<macpartner.Models.LeadCashBack>

@{
    ViewBag.Title = "Meus Bônus";
}

@section Scripts{


    <script type="text/javascript" src="/Scripts/jquery-1.8.3.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="/Scripts/jquery.maskedinput.js"></script>
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

    <script>
        $(".has-load").on('click', function () {

            $("#load").show();

        });
    </script>



    <script type="text/javascript">

        $('.count').each(function (index) {
            $(this).text($(this).text().replace(',', '.'));

            $(this).prop('Counter', 0).animate({
                Counter: $(this).text()
            }, {
                    duration: 1000,
                    easing: 'swing',
                    step: function (now) {
                        $(this).text(parseFloat(now).toFixed(2));
                        $(this).text('R$ ' + $(this).text().replace('.', ','));
                        $(this).text($(this).text().replace('.', ','));
                    }
                });
        });

    </script>

    <script>
        $(function () {
            $("#PontosDisponiveis").click(function () {

                    $("#modalBonusDisponiveis").modal("show");
            });
        })

        $(function () {
            $("#PontosUtilizados").click(function () {


                    $("#modalBonusResgatados").modal("show");
                })

            });
        })

        $(function () {
            $("#TotalPontos").click(function () {


                    $("#modalBonusTotal").modal("show");


            });
        })
    </script>

    <script type="text/javascript">

             $("#BtnResgataValor").click(function () {

                 if ($('#hasContaBancaria').text() == "True") {



                     location.href = '@Url.Action("ResgataBonusAsync", "LeadCashBacks")';

                     swal({
                         title: "Pronto!",
                         text: "Solicitação confirmada, agora é só esperar o pessoal da Manchester depositar a grana pra você ;)",
                         icon: "success",
                         button: "Entendi!",
                     });
                 }
                 else {

                     swal({
                         title: "Ops!",
                         text: "Antes de solicitar o resgate dos seus bonus é necessário cadastrar seus dados bancários. Tô te direcionando...",
                         icon: "warning",
                     });

                     setTimeout(
                         function () {
                             location.href = '@Url.Action("Create", "UserDadosBancarios")';
                         }, 7000);


                 }


             });

    </script>


}

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    decimal TotalValor = 0;
    decimal ValoresDisponiveis = 0;
    decimal ValoresUtilizados = 0;
    var hasContaBancaria = false;

    macpartner.Models.MacPartnerContext db = new macpartner.Models.MacPartnerContext();
    macpartner.Models.User user = new macpartner.Models.User();
    user = db.Users.Where(u => u.UserName == User.Identity.Name).First();
    var userDadosBancarios = db.UserDadosBancarios.Where(u => u.UserId == user.UserId).ToList();

    if (userDadosBancarios.Count > 0)
    {
        hasContaBancaria = true;
    }
    else
    {
        hasContaBancaria = false;
    }

    foreach (var item in Model)
    {
        if (!item.Contemplado)
        {
            ValoresDisponiveis += item.ValorProdutos + item.ValorServicos;
        }
        else
        {
            ValoresUtilizados += item.ValorProdutos + item.ValorServicos;
        }

        TotalValor += item.ValorProdutos + item.ValorServicos;
    }
}

<div class="jumbotron">
    <img class="banner_full" src="https://i.imgur.com/0acNo2Y.png" />
    <img class="banner_reduzido" src="~/Content/Resources/bonus_reduzido.png" />
</div>

<div class="MyContent" style="margin-top:-40px">

    <h4>Resumo de Bonus</h4>

    <center>
        <div class="MyHeaderContent">
            <table class="table-bordered">
                <thead>

                </thead>
                <tbody>
                    <tr>
                        <td>
                            <div class="MyDashboardDiv" data-toggle="modal" data-target="#modalBonusDisponiveis" id ="PontosDisponiveis">
                                    <center><h4>Bônus Disponíveis</h4></center>
                                    <center><h3 class="count">@ValoresDisponiveis</h3></center>
</div>
                        </td>
                        <td>
                            <div class="MyDashboardDiv" data-toggle="modal" data-target="#modalBonusResgatados" id="PontosUtilizados">
                                <center><h4>Bônus Utilizados</h4></center>
                                <center><h3 class="count">@ValoresUtilizados</h3></center>
                            </div>
                        </td>
                        <td>
                            <div class="MyDashboardDiv" data-toggle="modal" data-target="#modalBonusTotal" id="TotalPontos">
                                <center><h4>Bônus Totais</h4></center>
                                <center><h3 class="count">@TotalValor</h3></center>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </center>

    <h4>Últimos Leads Convertidos</h4>

    <div>
        <table class="table">
            <thead>
                <tr>
                    <th class="MyTh">
                        <h5>Nome Fantasia</h5>
                    </th>

                    <th class="MyTh">
                        <h5>Documento</h5>
                    </th>

                    <th class="MyTh">
                        <h5>Total Produtos</h5>
                    </th>

                    <th class="MyTh">
                        <h5>Total Serviços</h5>
                    </th>

                    <th class="MyTh">
                        <h5>CashBack Produtos</h5>
                    </th>

                    <th class="MyTh">
                        <h5>CashBack Servicos</h5>
                    </th>

                    <th class="MyTh">
                        <h5>Resgatado</h5>
                    </th>
                </tr>
            </thead>
            @foreach (var item in Model)
            {
                macpartner.Models.Lead lead = macpartner.Helpers.LeadHelper.LeadPontosById(item.LeadId);
                var contemplado = "";
                if (item.Contemplado)
                {
                    contemplado = "Sim";
                }
                else
                {
                    contemplado = "Não";
                }
                <tbody>
                    <tr>
                        <td class="MyTrTd">
                            <h5>@lead.fantasia</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>@lead.cnpj_cpf</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>R$ @lead.ValorProdutos</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>R$ @lead.ValorServicos</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>R$ @item.ValorProdutos</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>@item.ValorServicos</h5>
                        </td>

                        <td class="MyTrTd">
                            <h5>@contemplado</h5>
                        </td>
                    </tr>
                </tbody>
            }
        </table>
    </div>

</div>

<div class="modal fade" id="modalBonusDisponiveis">
    <p id="hasContaBancaria" hidden>@hasContaBancaria</p>
    <div class="modal-dialog" style="width:60%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
                <h4 class="modal-title">Bônus Disponíveis</h4>
            </div>
            <div class="modal-body">
                <h4>Extrato de Bônus Disponíveis</h4>
                <div>
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="MyTh">
                                    <h5>Nome Fantasia</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Documento</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Serviços</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Servicos</h5>
                                </th>
                            </tr>
                        </thead>
                        @foreach (var item in Model)
                        {
                            macpartner.Models.Lead lead = macpartner.Helpers.LeadHelper.LeadPontosById(item.LeadId);

                            if (!item.Contemplado)
                            {
                                <tbody>
                                    <tr>
                                        <td class="MyTrTd">
                                            <h5>@lead.fantasia</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>@lead.cnpj_cpf</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @lead.ValorProdutos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @lead.ValorServicos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @item.ValorProdutos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>@item.ValorServicos</h5>
                                        </td>
                                    </tr>
                                </tbody>
                            }
                        }
                    </table>
                </div>
            </div>
            <div class="modal-footer">

                <button type="button" class="btn btn-info" data-dismiss="modal">Fechar</button>

                @if (ValoresDisponiveis > 0)
                {
                    <button type="button" class="has-load btn btn-success" id="BtnResgataValor">Resgatar Valor</button>
                }

            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->



<div class="modal fade" id="modalBonusResgatados">
    <div class="modal-dialog" style="width:60%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
                <h4 class="modal-title">Bônus Resgatados</h4>
            </div>
            <div class="modal-body">
                <h4>Extrato de Bônus Resgatados</h4>
                <div>
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="MyTh">
                                    <h5>Nome Fantasia</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Documento</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Serviços</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Servicos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Data de Resgate</h5>
                                </th>
                            </tr>
                        </thead>
                        @foreach (var item in Model)
                        {
                            macpartner.Models.Lead lead = macpartner.Helpers.LeadHelper.LeadPontosById(item.LeadId);
                            macpartner.Models.LeadCashBack leadcb = db.LeadCashBacks.Where(l => l.LeadId == lead.LeadID).FirstOrDefault();
                            var lote = db.LeadCashBackLotes.SqlQuery("SELECT * FROM LeadCashBackLotes t1, LeadCashBacks t2 WHERE t1.LeadCashBackLoteId = t2.LeadCashBackLote_LeadCashBackLoteId and t2.LeadCashBackId =  " + leadcb.LeadCashBackId).FirstOrDefault();

                            if (item.Contemplado)
                            {
                                <tbody>
                                    <tr>
                                        <td class="MyTrTd">
                                            <h5>@lead.fantasia</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>@lead.cnpj_cpf</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @lead.ValorProdutos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @lead.ValorServicos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>R$ @item.ValorProdutos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>@item.ValorServicos</h5>
                                        </td>

                                        <td class="MyTrTd">
                                            <h5>@lote.data</h5>
                                        </td>
                                    </tr>
                                </tbody>
                            }


                        }
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->



<div class="modal fade" id="modalBonusTotal">
    <div class="modal-dialog" style="width:60%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
                <h4 class="modal-title">Bônus Totais</h4>
            </div>
            <div class="modal-body">
                <h4>Extrato Total de Bônus</h4>
                <div>
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="MyTh">
                                    <h5>Nome Fantasia</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Documento</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Total Serviços</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Produtos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>CashBack Servicos</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Resgatado</h5>
                                </th>

                                <th class="MyTh">
                                    <h5>Data de Resgate</h5>
                                </th>
                            </tr>
                        </thead>
                        @foreach (var item in Model)
                        {
                            macpartner.Models.Lead lead = macpartner.Helpers.LeadHelper.LeadPontosById(item.LeadId);
                            macpartner.Models.LeadCashBack leadcb = db.LeadCashBacks.Where(l => l.LeadId == lead.LeadID).FirstOrDefault();
                            var lote = db.LeadCashBackLotes.SqlQuery("SELECT * FROM LeadCashBackLotes t1, LeadCashBacks t2 WHERE t1.LeadCashBackLoteId = t2.LeadCashBackLote_LeadCashBackLoteId and t2.LeadCashBackId =  " + leadcb.LeadCashBackId).FirstOrDefault();
                            var contemplado = "";
                            if (item.Contemplado)
                            {
                                contemplado = "Sim";
                            }
                            else
                            {
                                contemplado = "Não";
                            }
                            <tbody>
                                <tr>
                                    <td class="MyTrTd">
                                        <h5>@lead.fantasia</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>@lead.cnpj_cpf</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>R$ @lead.ValorProdutos</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>R$ @lead.ValorServicos</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>R$ @item.ValorProdutos</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>@item.ValorServicos</h5>
                                    </td>

                                    <td class="MyTrTd">
                                        <h5>@contemplado</h5>
                                    </td>
                                    @if (contemplado.Equals("Sim"))
                                    {
                                        <td class="MyTrTd">
                                            <h5>@lote.data</h5>
                                        </td>
                                    }
                                    else
                                    {
                                        <td class="MyTrTd">
                                            <h5> -- </h5>
                                        </td>
                                    }

                                </tr>
                            </tbody>
                        }
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

Browser other questions tagged

You are not signed in. Login or sign up in order to post.