예제 #1
0
        public ActionResult Index()
        {
            List <SelectListItem> stateNames = new List <SelectListItem>();
            MarketerModel         marketMDL  = new MarketerModel();

            List <tbl_LK_State> states = _db.tbl_LK_State.ToList();

            states.ForEach(x =>
            {
                stateNames.Add(new SelectListItem {
                    Text = x.StateName, Value = x.StateID.ToString()
                });
            });
            marketMDL.LK_StateName = stateNames;

            return(View(marketMDL));
        }
예제 #2
0
        // GET: Marketer/Details/5
        public ActionResult Details(string code)
        {
            Marketer x = dao.rechercher(code);

            MarketerModel pm = new MarketerModel
            {
                CodeMARKETER = x.codeMARKETER,
                Nom          = x.nom,
                Adresse      = x.adresse,
                Email        = x.email,
                Pays         = x.pays,
                Telephone    = x.telephone,
                Ville        = x.ville
            };

            if (x == null)
            {
                return(HttpNotFound());
            }
            return(View(pm));
        }