示例#1
0
        // GET: Admin/TuvanDV
        public ActionResult Index(string searchString, int page = 1)
        {
            var dao   = new TuvanDVDao();
            var model = dao.ListAllPaging(searchString, page);

            ViewBag.SearchString = searchString;
            return(View(model));
        }
示例#2
0
        public void KhachHang(string mkh = null)
        {
            var dao  = new TuvanDVDao();
            var list = dao.Khachhang();
            List <SelectListItem> listItems = new List <SelectListItem>();

            foreach (TBL_KHACHHANG kh in list)
            {
                listItems.Add(new SelectListItem
                {
                    Text  = kh.HO_TEN + "-" + kh.DIEN_THOAI,
                    Value = kh.MA_KHACHHANG
                });
            }

            ViewBag.KHACHHANG = new SelectList(listItems, "Value", "Text", mkh);
        }