public ActionResult Request_Password_Change(String session)
 {
     Debug.WriteLine("Request change password from session " + session);
     KhachHangController ctr = new KhachHangController();
     KhachHang obj = ctr.timkiem("","","",null,0,0,"","","",session).FirstOrDefault();
     if(obj!=null)
     {
         ViewBag.khachhang_264 = obj;
         return View();
     }
     else
     {
         return RedirectToAction("Index","FrontHome");
     }
 }
 public ActionResult Index(int page=1)
 {
     //check
     if (!this._nhanvien_permission.Contains("khachhang_view"))
     {
         return this._fail_permission("khachhang_view");
     }
     KhachHangController ctr = new KhachHangController();
     LoaiKhachHangController ctr_lkh = new LoaiKhachHangController();
     List<LoaiKhachHang> lkh_list = ctr_lkh.timkiem(timkiem_khachhang["loaikhachhang_id"]);
     //pagination
         int max_item_per_page = TextLibrary.ToInt(this.timkiem_khachhang["max_item_per_page"]);//get from setting
         Pagination pg = new Pagination();
         pg.set_current_page(page);
         pg.set_max_item_per_page(max_item_per_page);
         pg.set_total_item(
             ctr.timkiem_count(
                 timkiem_khachhang["id"],
                 timkiem_khachhang["tendangnhap"],
                 timkiem_khachhang["tendaydu"],
                 lkh_list,
                 TextLibrary.ToInt(timkiem_khachhang["diem_from"]),
                 TextLibrary.ToInt(timkiem_khachhang["diem_to"]),
                 "","","","",
                 timkiem_khachhang["active"]
                 )
             );
         pg.update();
     //Chọn danh sách nhân viên để hiển thị theo cookies tìm kiếm
     ViewBag.KhachHang_List = ctr.timkiem(
             timkiem_khachhang["id"],
             timkiem_khachhang["tendangnhap"],
             timkiem_khachhang["tendaydu"],
             lkh_list,
             TextLibrary.ToInt(timkiem_khachhang["diem_from"]),
             TextLibrary.ToInt(timkiem_khachhang["diem_to"]),
             "", "", "", "",
             timkiem_khachhang["active"], "id", true, pg.start_point, pg.max_item_per_page
         );
     //set search cookies
     ViewBag.timkiem_khachhang = this.timkiem_khachhang;
     ViewBag.Title += " - Quản lý";
     ViewBag.pagination = pg;
     ViewBag.LoaiKhachHang_List = ctr_lkh.timkiem();
     return View();
 }