public ActionResult ShowIndustryList() { IndustryDataStore Obj = new IndustryDataStore(); List <SA_Industry> IndustryList = Obj.GetIndustryList(); return(View("industry-list", IndustryList)); }
public JsonResult GetCustIndustryList() { var LoginUser = Convert.ToInt32(Session["LoginUser"]); ProductDataStore ObjProduct = new ProductDataStore(); //var custProduct = ObjProduct.GetCustProductList(LoginUser); List <string> custProduct = ObjProduct.GetCustProductList(LoginUser); IndustryDataStore Obj = new IndustryDataStore(); var IndustryList = Obj.GetCustIndustryList(custProduct).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)); }
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; } }
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)); }