public HttpResponseMessage GetListCardWantToUse(CardUploadAPI listUpload)
        {
            var user = listUpload.CurrentUser;

            var model = new SelectListModelCardUploadReturn();

            model.ListSelfHost = listUpload.ListSelfHost;

            model.ListController = listUpload.ListController;

            model.ListEmployee = new List <Employee>();

            if (listUpload.ListFilter.isall)
            {
                var customergroups = GetListChild("", (listUpload.ListFilter.customergroupid));

                model.ListCard = _tblCardService.GetAllByFirst(listUpload.ListFilter.key, "", listUpload.ListFilter.cardgroupids, customergroups, "", "", listUpload.ListFilter.accesslevelids);
            }
            else
            {
                model.ListCard = _tblCardService.GetAllActiveByListIdForUpload(listUpload.ListCardId).ToList();
            }

            if (model.ListCard.Any())
            {
                foreach (var itemCard in model.ListCard)
                {
                    foreach (var itemController in model.ListController)
                    {
                        var map = new Employee();

                        map.CardNumber = itemCard.CardNumber.Trim();

                        map.AccessLevelID = itemCard.AccessLevelID.Trim();

                        map.ControllerIDs = itemController.ControllerID.ToString();

                        map.UserID = user.Id;

                        map.UserIDofFinger = 0;

                        if (listUpload.ListFilter.isusenewdate)
                        {
                            map.ExpireDate = Convert.ToDateTime(listUpload.ListFilter.newdateexpire).ToString("yyyyMMdd").Trim();
                        }
                        else
                        {
                            map.ExpireDate = Convert.ToDateTime(itemCard.AccessExpireDate).ToString("yyyyMMdd").Trim();
                        }

                        model.ListEmployee.Add(map);
                    }
                }
            }

            var content = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");

            return(new HttpResponseMessage()
            {
                StatusCode = HttpStatusCode.OK, Content = content, RequestMessage = Request
            });
        }