Esempio n. 1
0
        private void HistoryAdapter_ItemLongClick(object sender, HistoryAdapterClickEventArgs e)
        {
            string filePath = historyViewModels[e.Position].FileName;

            UserActionHelper.StartAction(Intent.ActionSend, filePath, this.Context);
            // StartAction(Intent.ActionSend, e.Position);
        }
Esempio n. 2
0
        public static List <UserWishlistDTO> RemoveUserWishList(this IGenericRepository <UserWishlist> userWishlistRepository, int userid, int productId)
        {
            var userWishList = userWishlistRepository.Find(x => x.User == userid && x.Product == productId).ToList <UserWishlist>();

            foreach (UserWishlist product in userWishList)
            {
                userWishlistRepository.Delete(product);
            }
            var userList = userWishlistRepository.Find(x => x.User == userid).ToList <UserWishlist>();

            return(UserActionHelper.GetUserWishlistModelFromUserWishlist(userList));
        }
Esempio n. 3
0
        public List <UserWishlistDTO> GetUserWishlist(string userName)
        {
            UserService userService = new UserService();
            var         currentUser = ClaimsPrincipal.Current.Identity.Name;

            if (currentUser == userName)
            {
                var user = userService.GetUser(currentUser);

                var userList = _unitOfWork.UserWishlistRepository.Find(x => x.User == user.UserId).ToList <UserWishlist>();
                return(UserActionHelper.GetUserWishlistModelFromUserWishlist(userList));
            }
            return(new List <UserWishlistDTO>());
        }
Esempio n. 4
0
        public static List <UserWishlistDTO> AddUserWishList(this IGenericRepository <UserWishlist> userWishlistRepository, int userid, int productId)
        {
            var selectedUserWishList = userWishlistRepository.Find(x => x.User == userid && x.Product == productId).ToList <UserWishlist>();

            if (selectedUserWishList == null || selectedUserWishList.Count == 0)
            {
                UserWishlist wishList = new UserWishlist();
                wishList.User         = userid;
                wishList.Product      = productId;
                wishList.CreatedOnUtc = DateTime.UtcNow;
                userWishlistRepository.Add(wishList);
            }
            var userList = userWishlistRepository.Find(x => x.User == userid).ToList <UserWishlist>();

            return(UserActionHelper.GetUserWishlistModelFromUserWishlist(userList));
        }
Esempio n. 5
0
 private void ImageView_LongClick(object sender, View.LongClickEventArgs e)
 {
     UserActionHelper.StartAction(Intent.ActionSend, retrievedFilePath, this);
 }