public async Task <IActionResult> ItemCreate() { ServiceReference_Item.Item[] lst_parentitems = await item.getAllItemAsync(); ServiceReference_Category.Category[] lst_categories = await cc.getAllCategoryAsync(); ServiceReference_Supplier.Supplier[] lst_suppliers = await s.getAllSupplierAsync(); ServiceReference_Unit.Unit[] lst_unit = await u.getAllUnitAsync(); ItemModel im = new ItemModel() { parentitems = lst_parentitems, categories = lst_categories, suppliers = lst_suppliers, units = lst_unit }; ViewBag.flag = flag; ViewBag.message = message; flag = ""; message = ""; return(View(im)); }
public async Task <ServiceReference_Category.Category[]> getAllCategory() { ServiceReference_Category.Category[] lst_itemParent = await cs.getAllCategoryAsync(); return(lst_itemParent); }
public async Task <IActionResult> CategoryIndex() { var model = await cs.getAllCategoryAsync(); return(View(model)); }