Ejemplo n.º 1
0
        public async Task <ActionResult> OnPostBrojElemenataNaStrani(int brEl)
        {
            bool log = !string.IsNullOrEmpty(HttpContext.Session.GetString("idKupac"));

            if (log)
            {
                HttpContext.Session.SetString("pageSize", brEl.ToString());
                HttpContext.Session.SetString("Search1", string.IsNullOrEmpty(Search1) ? "0" : Search1.ToString());
                HttpContext.Session.SetString("Search3", string.IsNullOrEmpty(Search3) ? "0" : Search3.ToString());
                HttpContext.Session.SetString("DO", CenaDO.ToString());
                HttpContext.Session.SetString("OD", CenaOD.ToString());
                HttpContext.Session.SetString("Cena", Cena.ToString());
                return(RedirectToPage("./Kupovina", new { pageIndex = 1 }));
            }
            else
            {
                return(RedirectToPage("../Index"));
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnPostPretrazi()
        {
            Console.WriteLine(Search1 + " --- " + Search3 + " --- " + Cena + " --- " + CenaDO + " --- " + CenaDO);
            HttpContext.Session.SetString("Search1", string.IsNullOrEmpty(Search1) ? "0" : Search1.ToString());
            HttpContext.Session.SetString("Search3", string.IsNullOrEmpty(Search3) ? "0" : Search3.ToString());
            HttpContext.Session.SetString("DO", CenaDO.ToString());
            HttpContext.Session.SetString("OD", CenaOD.ToString());
            HttpContext.Session.SetString("Cena", Cena.ToString());

            return(RedirectToPage());
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> OnPostIdiNaStranu()
        {
            bool log = !string.IsNullOrEmpty(HttpContext.Session.GetString("idKupac"));

            if (log)
            {
                Console.WriteLine(pageInput + "++++++++++");
                HttpContext.Session.SetString("Search1", string.IsNullOrEmpty(Search1) ? "0" : Search1.ToString());
                HttpContext.Session.SetString("Search3", string.IsNullOrEmpty(Search3) ? "0" : Search3.ToString());
                HttpContext.Session.SetString("DO", CenaDO.ToString());
                HttpContext.Session.SetString("OD", CenaOD.ToString());
                HttpContext.Session.SetString("Cena", Cena.ToString());
                return(RedirectToPage("./Kupovina", new { pageIndex = pageInput }));
            }
            else
            {
                return(RedirectToPage("../Index"));
            }
        }