public ActionResult ProductList(string id, string search)
        {
            NewsDataStore        Obj      = new NewsDataStore();
            DealsDataStore       d        = new DealsDataStore();
            ProductListViewModel model    = new ProductListViewModel();
            List <SA_News>       NewsList = Obj.GetNewsList();

            model.NewsList = NewsList;
            List <SA_Deals> DealList = d.GetDealsList();

            model.DealsList = DealList;
            ProductDataStore        p           = new ProductDataStore();
            IQueryable <SA_Product> ProductList = p.GetProductListBySearch(id, search);

            model.ProductList = ProductList;
            CategoryDataStore c = new CategoryDataStore();

            if (id != "")
            {
                var categoryName = c.GetCategoryByid(Convert.ToInt32(id));
                ViewBag.CategoryName = categoryName.CategoryName;
            }
            else
            {
                ViewBag.CategoryName = "";
            }

            ViewBag.category = c.CategoryList();
            return(View("~/Views/ChemAnalyst/products.cshtml", model));
        }
예제 #2
0
        public ActionResult DealsDetails(int id)
        {
            NewsDataStore         Obj2 = new NewsDataStore();
            DealsDataStore        Obj  = new DealsDataStore();
            DealsDetailsViewModel d    = new DealsDetailsViewModel();

            d.Deals    = Obj.GetDealsByid(id);
            d.NewsList = Obj2.GetNewsList();
            d.DealList = Obj.GetDealsList();
            return(View(d));
        }
        public ActionResult FreeTrail()
        {
            NewsDataStore     Obj      = new NewsDataStore();
            DealsDataStore    d        = new DealsDataStore();
            IndustryViewModel model    = new IndustryViewModel();
            List <SA_News>    NewsList = Obj.GetNewsList();

            model.NewsList = NewsList;
            List <SA_Deals> DealList = d.GetDealsList();

            model.DealsList = DealList;
            return(View("FreeTrial", model));
        }
        public ActionResult IndustryReport(int id)
        {
            NewsDataStore      n            = new NewsDataStore();
            DealsDataStore     d            = new DealsDataStore();
            IndustryViewModel  model        = new IndustryViewModel();
            List <SA_Industry> IndustryList = Obj.GetIndustryList().Where(w => w.id == id).OrderBy(w => w.id).ToList();;

            model.Industry = IndustryList;
            List <SA_News> NewsList = n.GetNewsList();

            model.NewsList = NewsList;
            List <SA_Deals> DealList = d.GetDealsList();

            model.DealsList = DealList;
            return(View(model));
        }
        public ActionResult IndustryReports(int id)
        {
            NewsDataStore     n     = new NewsDataStore();
            DealsDataStore    d     = new DealsDataStore();
            IndustryViewModel model = new IndustryViewModel();
            //List<SA_Industry> IndustryList = Obj.GetIndustryList();
            List <SA_Industry> IndustryList = Obj.GetCustIndustryList(id);

            model.Industry = IndustryList;
            List <SA_News> NewsList = n.GetNewsList();

            model.NewsList = NewsList;
            List <SA_Deals> DealList = d.GetDealsList();

            model.DealsList = DealList;
            return(View(model));
        }
        public ActionResult NewsList()
        {
            NewsDataStore  Obj      = new NewsDataStore();
            List <SA_News> NewsList = Obj.GetNewsList();

            DealsDataStore  ObjDeal  = new DealsDataStore();
            List <SA_Deals> DealList = ObjDeal.GetDealsList();

            var news = NewsList.OrderByDescending(w => w.id).Take(3).ToList();
            var deal = DealList.OrderByDescending(w => w.id).Take(3).ToList();

            NewDealVM NewsDeal = new NewDealVM();

            NewsDeal.lstNews  = news;
            NewsDeal.lstDeals = deal;

            return(PartialView("~/Views/PartialView/NewPartialView.cshtml", NewsDeal));
        }
        public ActionResult ProductList()
        {
            NewsDataStore        Obj      = new NewsDataStore();
            DealsDataStore       d        = new DealsDataStore();
            ProductListViewModel model    = new ProductListViewModel();
            List <SA_News>       NewsList = Obj.GetNewsList();

            model.NewsList = NewsList;
            List <SA_Deals> DealList = d.GetDealsList();

            model.DealsList = DealList;
            ProductDataStore  p           = new ProductDataStore();
            List <SA_Product> ProductList = p.GetProductList();

            model.ProductList = ProductList;
            CategoryDataStore c = new CategoryDataStore();

            ViewBag.category = c.CategoryList();
            return(View("~/Views/ChemAnalyst/products.cshtml", model));
        }
예제 #8
0
        public ActionResult NewsHome(int?page)
        {
            int               pageSize = 6;
            NewsDataStore     n        = new NewsDataStore();
            ProductDataStore  p        = new ProductDataStore();
            NewsHomeViewModel model    = new NewsHomeViewModel();

            //ViewBag.formdate = new DateTime(DateTime.Now.Year,DateTime.Now.Month,01).ToString("MM/dd/yyyy");
            //ViewBag.todate = DateTime.Now.ToString("MM/dd/yyyy");
            if (Session["UserRole"] != null && Session["UserRole"].ToString().ToUpper() == "CUSTOMER")
            {
                model.NewsList = n.GetCustNewsList(Convert.ToInt32(Session["LoginUser"])).ToPagedList(page ?? 1, pageSize);
            }

            else
            {
                model.NewsList = n.GetNewsList().ToPagedList(page ?? 1, pageSize);
            }
            ViewBag.category = p.ProductList();
            return(View(model));
        }