Ejemplo n.º 1
0
        // POST: Countries/Edit
        public ActionResult Edit(Country pais)
        {
            var cp = new CountryProcess();

            cp.Edit(pais);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        // GET: Countries/Country
        public ActionResult Index()
        {
            var cp    = new CountryProcess();
            var lista = cp.SelectList();

            return(View(lista));
        }
Ejemplo n.º 3
0
        // GET: Countries/Edit
        public ActionResult Edit(int id)
        {
            var cp   = new CountryProcess();
            var pais = cp.Find(id);

            return(View(pais));
        }
Ejemplo n.º 4
0
        // POST: Countries/Create
        public ActionResult Create(Country pais)
        {
            var cp = new CountryProcess();

            cp.Insert(pais);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 5
0
        // GET: Countries/Delete
        public ActionResult Delete(int id)
        {
            var cp = new CountryProcess();

            cp.Delete(id);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 6
0
        // GET: Client/Create
        public ActionResult Create()
        {
            var country = new CountryProcess().SelectList();

            ViewBag.Country = new SelectList(country, "Id", "Name");

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

            ViewBag.countries = countries;

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

            ViewData["Country"] = lista;

            return(View());
        }
Ejemplo n.º 9
0
        // GET: Client/Edit/5
        public ActionResult Edit(int id)
        {
            var country = new CountryProcess().SelectList();

            ViewBag.Country = new SelectList(country, "Id", "Name", id);

            var cp = new ClientProcess();

            return(View(cp.findClient(id)));
        }
Ejemplo n.º 10
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.º 11
0
        // GET: Clients/Details
        public ActionResult Details(int id)
        {
            var cp     = new ClientProcess();
            var client = cp.Find(id);

            var cop         = new CountryProcess();
            var descCountry = cop.Find(client.CountryId);

            ViewData["Country"] = descCountry.Name;

            return(View(client));
        }
Ejemplo n.º 12
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.º 13
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));
        }
Ejemplo n.º 14
0
        // GET: Clients/Details
        public ActionResult Details(int id)
        {
            var cp     = new ClientProcess();
            var client = cp.Find(id);

            var cp2         = new CountryProcess();
            var CountryName = cp2.Find(client.CountryId);

            ViewData["Country"] = CountryName.Name;

            return(View(client));
        }
Ejemplo n.º 15
0
        // GET: Dealer/Edit/5
        public ActionResult Edit(int id)
        {
            var category = new CategoryProcess().SelectList();
            var country  = new CountryProcess().SelectList();

            ViewBag.Category = new SelectList(category, "Id", "Name", id);
            ViewBag.Country  = new SelectList(country, "Id", "Name", id);

            var cp = new DealerProcess();

            return(View(cp.findDealer(id)));
        }
Ejemplo n.º 16
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));
        }
        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.º 18
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());
        }
 public ActionResult Edit(Country country)
 {
     try
     {
         var cp = new CountryProcess();
         cp.editCountry(country);
         DataCache.Instance.CountryListRemove();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Delete(int id, Country country)
 {
     try
     {
         var cp = new CountryProcess();
         cp.deleteCountry(id);
         DataCache.Instance.CountryListRemove();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 21
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.º 22
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.º 23
0
        // GET: Dealers/Details
        public ActionResult Details(int id)
        {
            var dp     = new DealerProcess();
            var dealer = dp.Find(id);

            var cp          = new CountryProcess();
            var nameCountry = cp.Find(dealer.CountryId);

            ViewData["Country"] = nameCountry.Name;

            var cp2          = new CategoryProcess();
            var nameCategory = cp2.Find(dealer.CategoryId);

            ViewData["Category"] = nameCategory.Name;

            return(View(dealer));
        }
Ejemplo n.º 24
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));
        }
        // GET: Country/Delete/5
        public ActionResult Delete(int id)
        {
            var cp = new CountryProcess();

            return(View(cp.findCountry(id)));
        }