コード例 #1
0
        public ActionResult ShowIndustryList()
        {
            IndustryDataStore  Obj          = new IndustryDataStore();
            List <SA_Industry> IndustryList = Obj.GetIndustryList();

            return(View("industry-list", IndustryList));
        }
コード例 #2
0
 public ActionResult LoadIndustryData()
 {
     try
     {
         ProductDataStore  ObjProduct = new ProductDataStore();
         IndustryDataStore Obj        = new IndustryDataStore();
         var IndustryList             = Obj.GetIndustryList().Select(w => new IndustryVM
         {
             id         = w.id,
             Title      = w.Title,
             CreateTime = w.CreatedTime != null ? w.CreatedTime.Value.ToString("dd/MM/yyyy") : "",
             Product    = w.Product != null ? ObjProduct.GetProductByid(w.Product).ProductName : "",
         });
         return(Json(new { data = IndustryList }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
        public ActionResult Reportsection()
        {
            IndustryDataStore Obj     = new IndustryDataStore();
            string            cate    = Request.Form["categoryname"] != null ? Request.Form["categoryname"].ToString() : "";
            string            country = Request.Form["countryname"] != null ? Request.Form["countryname"].ToString() : "";

            ViewBag.Cat = cate;
            ViewBag.Cou = country;
            CategoryDataStore  d            = new CategoryDataStore();
            IndustryViewModel  model        = new IndustryViewModel();
            List <SA_Industry> IndustryList = Obj.GetIndustryList().Where(x => (cate == "" || cate.Contains(x.CategoryID.ToString() + ",")) && (country == "" || country.Contains(x.CountryID.ToString() + ","))).OrderBy(w => w.id).OrderByDescending(w => w.id).ToList();

            model.Industry = IndustryList;
            List <SelectListItem> lstCategory = d.CategoryList();

            model.lstCategory = lstCategory;

            List <SelectListItem> lstCountry = d.CountryList();

            model.lstCountry = lstCountry;

            return(View("CustIndustry", model));
        }
コード例 #4
0
        public JsonResult IndustryList()
        {
            List <SA_Industry> NewsList = Obj.GetIndustryList().OrderByDescending(w => w.id).ToList();

            return(Json(new { data = NewsList }, JsonRequestBehavior.AllowGet));
        }