public ActionResult Category() { List <CategoryModel> list = CategoryModel.GetCategories(); ViewBag.lis = list; return(View()); }
private void GetCategory() { try { CategoryModel categoryModel = new CategoryModel(); dgvCategory.DataSource = categoryModel.GetCategories(); } catch (SqlException ex) { DialogConfirm.GetDialogResult(ex.Message, "Warning"); return; } }
public ActionResult Index() { return(View(categoryModel.GetCategories())); }
public List <CategoryModel> GetCategories() { return(categoryModel.GetCategories()); }