Ejemplo n.º 1
0
        // GET: Countries/Country
        public ActionResult Index()
        {
            var cp    = new CountryProcess();
            var lista = cp.SelectList();

            return(View(lista));
        }
Ejemplo n.º 2
0
        // GET: Clients/Create
        public ActionResult Create()
        {
            var cp    = new CountryProcess();
            var lista = cp.SelectList();

            ViewData["Country"] = lista;

            return(View());
        }
Ejemplo n.º 3
0
        public ActionResult Create()
        {
            var countryProcess = new CountryProcess();
            var countries      = countryProcess.SelectList();

            ViewBag.countries = countries;

            return(View());
        }
Ejemplo n.º 4
0
        // GET: Clients/Create
        public ActionResult Create(string id, string mail)
        {
            ViewBag.Id   = id;
            ViewBag.Mail = mail;
            var cp    = new CountryProcess();
            var lista = cp.SelectList();

            ViewData["Country"] = lista;
            return(View());
        }
Ejemplo n.º 5
0
        // GET: Clients/Edit
        public ActionResult Edit(int id)
        {
            var cp  = new ClientProcess();
            var cat = cp.Find(id);

            var cp2   = new CountryProcess();
            var lista = cp2.SelectList();

            ViewData["Country"] = lista;

            return(View(cat));
        }
Ejemplo n.º 6
0
        // GET: Clients/Client
        public ActionResult Index()
        {
            var cp    = new ClientProcess();
            var lista = cp.SelectList();

            var cp2          = new CountryProcess();
            var listaCountry = cp2.SelectList();

            ViewData["Country"] = listaCountry;

            return(View(lista));
        }
        public void CountryListRemove()
        {
            _cacheServices.Remove(DataCacheSetting.Country.Key);

            var lista = _cacheServices.GetOrAdd(
                DataCacheSetting.Country.Key,
                () =>
            {
                var cp = new CountryProcess();
                return(cp.SelectList());
            },
                DataCacheSetting.Country.SlidingExpiration);
        }
Ejemplo n.º 8
0
        //
        // GET: /Students/Student/
        public ActionResult Index()
        {
            var studentProcess = new StudentProcess();
            var country        = new CountryProcess();
            var lista          = studentProcess.SelectList();
            var countries      = country.SelectList();

            foreach (var l in lista)
            {
                l.Pais = countries.Find(p => p.Id == l.CountryId);
            }
            return(View(lista));
        }
Ejemplo n.º 9
0
        // GET: Dealers/Create
        public ActionResult Create()
        {
            var cop          = new CountryProcess();
            var listaCountry = cop.SelectList();

            ViewData["Country"] = listaCountry;

            var cap           = new CategoryProcess();
            var listaCategory = cap.SelectList();

            ViewData["Category"] = listaCategory;

            return(View());
        }
Ejemplo n.º 10
0
        //
        // GET: /Dealer/Dealer/
        public ActionResult Index()
        {
            var resp         = dealerProcess.SelectList();
            var listCategory = categoryProcess.SelectList();
            var listCountry  = countryProcess.SelectList();

            Dictionary <int, string> mapIdCategory = new Dictionary <int, string>();
            Dictionary <int, string> mapIdCountry  = new Dictionary <int, string>();

            foreach (ASF.Entities.Category cat in listCategory)
            {
                mapIdCategory.Add(cat.Id, cat.Name);
            }

            foreach (ASF.Entities.Country coun in listCountry)
            {
                mapIdCountry.Add(coun.Id, coun.Name);
            }

            ViewBag.countries  = mapIdCountry;
            ViewBag.categories = mapIdCategory;

            return(View(resp));
        }
Ejemplo n.º 11
0
        // GET: Clients/Client
        public ActionResult Index()
        {
            var cp    = new ClientProcess();
            var lista = cp.SelectList();

            //var cop = new CountryProcess();
            //var descCountry = cop.Find(client.CountryId);
            //ViewData["Country"] = descCountry.Name;

            var cop            = new CountryProcess();
            var listaCountries = cop.SelectList();

            ViewData["Country"] = listaCountries;

            return(View(lista));
        }
Ejemplo n.º 12
0
        // GET: Dealers/Edit
        public ActionResult Edit(int id)
        {
            var dp     = new DealerProcess();
            var dealer = dp.Find(id);

            var cp           = new CountryProcess();
            var listaCountry = cp.SelectList();

            ViewData["Country"] = listaCountry;

            var cp2           = new CategoryProcess();
            var listaCategory = cp2.SelectList();

            ViewData["Category"] = listaCategory;

            return(View(dealer));
        }
Ejemplo n.º 13
0
        // GET: Dealers/Dealer
        public ActionResult Index()
        {
            var dp    = new DealerProcess();
            var lista = dp.SelectList();

            var cp           = new CountryProcess();
            var listaCountry = cp.SelectList();

            ViewData["Country"] = listaCountry;

            var cp2           = new CategoryProcess();
            var listaCategory = cp2.SelectList();

            ViewData["Category"] = listaCategory;

            return(View(lista));
        }
Ejemplo n.º 14
0
        //
        // GET: /Country/Country/
        public ActionResult Index()
        {
            var resp = countryProcess.SelectList();

            return(View(resp));
        }