Example #1
0
 public ActionResult Index(string SearchString)
 {
     if (!string.IsNullOrEmpty(SearchString))
     {
         return(View(Dao.ListAll().Where(x => x.LanguageId.Contains(SearchString) || x.Description.Contains(SearchString)).OrderBy(x => x.LanguageId).ToList()));
     }
     else
     {
         return(View(Dao.ListAll().OrderBy(x => x.LanguageId).ToList()));
     }
 }
Example #2
0
 public ActionResult Add()
 {
     ViewBag.CategoryId = new SelectList(DaoCategories.ListAllByTaxonomy("Product"), "Id", "Title");
     ViewBag.LanguageId = new SelectList(DaoLanguage.ListAll(), "LanguageId", "Description", "vi");
     return(View());
 }