/// <summary>
        /// Quản lý Employeee
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(int page = 1, string searchValue = "", string country = "")
        {
            var model = new Models.EmployeePaginationResult()
            {
                Page        = page,
                PageSize    = 3,
                RowCount    = CatalogBLL.Employee_Count(searchValue, country),
                SearchValue = searchValue,
                Country     = country,
                Data        = CatalogBLL.Employee_List(page, 3, searchValue, country)
            };

            return(View(model));
        }
Exemple #2
0
        // GET: Employee
        public ActionResult Index(int page = 1, string searchValue = "", string country = "")
        {
            var model = new Models.EmployeePaginationResult()
            {
                SearchValue = searchValue,
                Country     = country,
                Page        = page,
                PageSize    = AppSettings.DefaultPagesize,
                RowCount    = HumanResourceBLL.Employee_Count(searchValue, country),
                Data        = HumanResourceBLL.Employee_List(page, AppSettings.DefaultPagesize, searchValue, country)
            };

            return(View(model));
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            HttpCookie requestCookie = Request.Cookies["userInfo"];
            int        idCookie      = Convert.ToInt32(requestCookie["AccountID"]);
            var        model         = new Models.EmployeePaginationResult()
            {
                Page        = page,
                PageSize    = AppSettings.DefaultPageSize,
                RowCount    = HumanResourceBLL.Employee_Count(searchValue, idCookie),
                Data        = HumanResourceBLL.Employee_List(page, AppSettings.DefaultPageSize, searchValue, idCookie),
                SearchValue = searchValue,
            };

            return(View(model));
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int             pageSize       = 5;
            int             rowCount       = 0;
            List <Employee> listOfEmployee = CatalogBLL.ListOfEmployees(page, pageSize, searchValue, out rowCount);
            var             model          = new Models.EmployeePaginationResult()
            {
                Page        = page,
                PageSize    = pageSize,
                RowCount    = rowCount,
                SearchValue = searchValue,
                Data        = listOfEmployee
            };

            return(View(model));
        }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        ///

        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int pageSize = 3;
            int rowCount = 0;
            //Muốn sử dụng out bắt buộc phải chỉ định giá trị trước khi sử dụng
            List <Employee> listOfEmployee = CatalogBLL.ListOfEmployees(page, pageSize, searchValue, out rowCount);
            var             model          = new Models.EmployeePaginationResult()
            {
                Page       = page,
                PageSize   = pageSize,
                RowCount   = rowCount,
                SeachValue = searchValue,
                Data       = listOfEmployee
            };

            return(View(model));
        }
        /// <summary>
        /// View page: List of employees
        /// </summary>
        /// <param name="page"></param>
        /// <param name="searchValue"></param>
        /// <param name="country"></param>
        /// <returns></returns>
        public IActionResult Index(int page = 1, string searchValue = "", string country = "")
        {
            int             rowCount       = 0;
            int             pageSize       = 10;
            List <Employee> listOfEmployee = CatalogBLL.ListOfEmployee(page, pageSize, searchValue ?? "", out rowCount, country);

            var model = new Models.EmployeePaginationResult()
            {
                Page            = page,
                Data            = listOfEmployee,
                PageSize        = pageSize,
                RowCount        = rowCount,
                SearchValue     = searchValue,
                SelectedCountry = country,
            };

            return(View(model));
        }
Exemple #7
0
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int             pageSize       = 3;
            int             rowCount       = 0;
            List <Employee> listOfEmployee = CataLogBLL.ListOfEmployee(page, pageSize, searchValue, out rowCount);
            var             model          = new Models.EmployeePaginationResult()
            {
                Page        = page,
                PageSize    = pageSize,
                RowCount    = rowCount,
                Data        = listOfEmployee,
                SearchValue = searchValue
            };

            //  int pagesize = 3;
            // int rowcount = 0;
            // list<supplier> model = catalogbll.listofsupplier(page, pagesize, searchvalue, out rowcount);
            //  viewbag.rowcount = rowcount;
            return(View(model));
        }