コード例 #1
0
 // GET: Opportunities/Create
 public ActionResult Create()
 {
     ViewBag.CampaignSourceId = new SelectList(campaignSourceService.GetAll(), "Id", "Name");
     ViewBag.CompanyId        = new SelectList(companyService.GetAll(), "Id", "Name");
     ViewBag.ContactId        = new SelectList(contactService.GetAll(), "Id", "FullName");
     ViewBag.LeadSourceId     = new SelectList(leadSourceService.GetAll(), "Id", "Name");
     return(View());
 }
コード例 #2
0
        // GET: CampaignSources
        public ActionResult Index()
        {
            var campaignSources = Mapper.Map <IEnumerable <CampaignSourceViewModel> >(campaignSourceService.GetAll());

            return(View(campaignSources));
        }