Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var model = new DashboardResult
            {
                sumSupplier = CatalogBLL.Supplier_Count(""),
                sumCustomer = CatalogBLL.Customer_Count(""),
                sumShipper  = CatalogBLL.Shipper_Count(""),
                sumCategory = CatalogBLL.Category_Count(""),
                sumProduct  = CatalogBLL.Product_Count("", "", ""),
                sumOrder    = SaleManagementBLL.Order_Count("", ""),
                sumEmployee = HumanResourceBLL.Employee_Count("", "")
            };

            return(View(model));
        }
Ejemplo n.º 3
0
        /// <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));
        }
        public static List <SelectListItem> Employee(bool allowSelectAll = true)
        {
            List <SelectListItem> list = new List <SelectListItem>();

            if (allowSelectAll)
            {
                list.Add(new SelectListItem()
                {
                    Value = "0", Text = "-- All Employees --"
                });
            }
            foreach (var employee in HumanResourceBLL.Employees_List(1, HumanResourceBLL.Employee_Count("", ""), "", ""))
            {
                list.Add(new SelectListItem()
                {
                    Value = employee.EmployeeID.ToString(),
                    Text  = employee.LastName + " " + employee.FirstName
                });
            }
            return(list);
        }