none
afficher sur le modal (asp.net mvc3) RRS feed

  • Discussion générale

  • Je veux afficher dans le popup de bootstrap un tableau de la liste des prospets mais il s'affiche pa

    controller.cs

    public ActionResult MarketingIndex( )
        { 

                WebClientApplication.Models.MembreList membrelist = new WebClientApplication.Models.MembreList();
                List<WebClientApplication.Models.MembreList.Marketing> marketingListing = new List<WebClientApplication.Models.MembreList.Marketing>();
                List<MarketingList> m=listManager.GetMarketingLists().ToList();
                foreach(var item in m)
                {WebClientApplication.Models.MembreList.Marketing marketing=new WebClientApplication.Models.MembreList.Marketing();
                marketing.idList=item.idList;
                marketing.ListName=item.ListName;
                marketing.Objectif=item.Objectif;
                marketing.Cost = item.Cost;
                marketing.idEmployee = item.idEmployee;

                marketingListing.Add(marketing);
                }
                membrelist.marketingListing = marketingListing;
                List<WebClientApplication.Models.MembreList.Prospect> prospectListing=( List<WebClientApplication.Models.MembreList.Prospect>)TempData["prospectListing"];
                membrelist.prospectListing = prospectListing;
                return View(membrelist);
            }

    view.cshtml:

    <a href="#myModal1" role="button" class="icon-btn span3" data-toggle="modal" id="AddProspectToList">
                            <i class="icon-group"></i>
                            <div>Gérer les membres</div>

                        </a>  

    marketing.js

     $("#AddProspectToList").click(function () {
            console.log("Handler for .click() called.");

            var selectedList = document.getElementById("AddProspectToList").value;
            var checkedItem = new Array;

            $("td div span.checked :checkbox:checked").each(function (i) {
                checkedItem.push($(this).attr("value"));
                console.log("finish" + $(this).attr("value"));

                var a = checkedItem;

                console.log("btn close");
                var url = '/MarketingList/AddProspectToList?checkedItem=' + checkedItem;
                $.post('/MarketingList/AddProspectToList?checkedItem=' + checkedItem);

            });
            console.log("btn close");
        });

                       
    • Type modifié Aurel Bera vendredi 4 avril 2014 06:37 disc
    vendredi 28 mars 2014 14:42

Toutes les réponses