Example #1
0
        public ActionResult Category()
        {
            List <CategoryModel> list = CategoryModel.GetCategories();

            ViewBag.lis = list;
            return(View());
        }
Example #2
0
 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());
 }