public ActionResult PhoneModel(int page = 1, int pageSize = 100) { var lstCollection = PhoneModelDAO.GetAllPhoneModel(); var lstBrand = BrandModel.GetAllBrand(); if (lstCollection == null) { lstCollection = new List <PhoneModelBO>(); } if (lstBrand == null) { lstBrand = new List <BrandBO>(); } ViewBag.ListBrand = lstBrand; return(View(lstCollection.OrderBy(x => x.group).ToList())); }
public void InitSelectListPhoneModel(long?selectedID = null) { var litsPhoneModel = new SelectList(PhoneModelDAO.GetAllPhoneModel(), "id", "name", selectedID); ViewBag.PhoneModelID = litsPhoneModel; }