Exemplo n.º 1
0
        public ActionResult Index()
        {
            var model = _taiKhoanRepository.GetAllTaiKhoan();
            var quyen = quyenRepository.GetAllQuyen();

            var query = from tk in model.Data
                        join q in quyen.Data on tk.MaQuyen equals q.MaQuyen
                        select new TaiKhoanModel
            {
                TenTaiKhoan = tk.TenTaiKhoan,
                Matkhau     = tk.Matkhau,
                TenQuyen    = q.TenQuyen,
                HoTen       = tk.HoTen,
                GioiTinh    = tk.GioiTinh,
                NgaySinh    = tk.NgaySinh,
                DiaChi      = tk.DiaChi
            };

            return(View(query));
        }
Exemplo n.º 2
0
        // GET: Admin/Quyen
        public ActionResult Index()
        {
            var model = _quyenRepo.GetAllQuyen();

            return(View(model.Data));
        }