Ejemplo n.º 1
0
        public ActionResult serachforproducts(int id = 0, string text = "")
        {
            productsrepository     rep_products = new productsrepository();
            entityproducutsreposit rep_ent      = new entityproducutsreposit();
            var q = rep_products.getproducts().Where(a => a.categoryid.Equals(id) && (a.name.Contains(text) || a.codename.Contains(text))).OrderBy(a => a.codename);

            return(PartialView("_Partialproductslist", q));
        }
Ejemplo n.º 2
0
        public ActionResult filterbyC(int id = 0)
        {
            productsrepository     rep_products = new productsrepository();
            entityproducutsreposit rep_ent      = new entityproducutsreposit();
            var q = rep_products.getproducts().Where(a => a.categoryid.Equals(id) && a.grade.ToUpper() == "C").OrderBy(a => a.codename);

            return(PartialView("_Partialproductslist", q));
        }
Ejemplo n.º 3
0
        public ActionResult sortingdefault(int id = 0)
        {
            productsrepository     rep_products = new productsrepository();
            entityproducutsreposit rep_ent      = new entityproducutsreposit();
            var q = rep_products.getproducts().Where(a => a.categoryid.Equals(id)).OrderBy(a => a.codename);

            return(PartialView("_Partialproductslist", q));
        }