/// <summary> /// Get all suppliers /// </summary> /// <param name=""></param> /// <returns></returns> public IActionResult GetAllSuppliersList() { List <TreeModel> treeModels = new List <TreeModel>(); var suppliers = _supAppService.GetAllList(); foreach (var supplier in suppliers) { treeModels.Add(new TreeModel() { Id = supplier.Id.ToString(), Text = supplier.SupplierName, Parent = supplier.Id == Guid.Empty ? "#" : supplier.Id.ToString() }); } return(Json(treeModels)); }
//// GET: /<controller>/ //public IActionResult Index() //{ // return View(); //} // GET: Suppliers public IActionResult Index() { return(View(_service.GetAllList().OrderByDescending(s => s.ModifiedTime))); }