Ejemplo n.º 1
0
        public async Task <ResultData <R_DataPaging <TUserPassWord> > > QueryUserPassWordPaging(int userId, int pageIndex, int pageSize)
        {
            try
            {
                UserPassWordService service = new UserPassWordService();
                var dataPaging = await service.QueryUserPassWordPaging(userId, pageIndex, pageSize);

                return(await OutDataAsync(dataPaging));
            }
            catch (Exception e)
            {
                return(await OutErrorAsync <R_DataPaging <TUserPassWord> >(e.Message));
            }
        }
Ejemplo n.º 2
0
        public async Task <ResultData <string> > InsertUserPassWord(TUserPassWord userPassWord)
        {
            try
            {
                UserPassWordService service = new UserPassWordService();
                await service.InsertUserPassWord(userPassWord);

                return(await OutDataAsync());
            }
            catch (Exception e)
            {
                return(await OutErrorAsync <string>(e.Message));
            }
        }
Ejemplo n.º 3
0
        public async Task <ResultData <TUserPassWord> > QueryUserPassWordById(string encryptId)
        {
            try
            {
                UserPassWordService service = new UserPassWordService();
                int           id            = int.Parse(_protector.Unprotect(encryptId));
                TUserPassWord userPassWord  = await service.QueryUserPassWordById(id);

                return(await OutDataAsync(userPassWord));
            }
            catch (Exception e)
            {
                return(await OutErrorAsync <TUserPassWord>(e.Message));
            }
        }
Ejemplo n.º 4
0
        public async Task <ResultData <string> > UpdateUserPassWord(TUserPassWord userPassWord)
        {
            try
            {
                UserPassWordService service = new UserPassWordService();
                userPassWord.Id = int.Parse(_protector.Unprotect(userPassWord.EncryptId));
                await service.UpdateUserPassWord(userPassWord);

                return(await OutDataAsync());
            }
            catch (Exception e)
            {
                return(await OutErrorAsync <string>(e.Message));
            }
        }
Ejemplo n.º 5
0
        public async Task <ResultData <string> > DeleteUserPassWordById(string encryptId)
        {
            try
            {
                UserPassWordService service = new UserPassWordService();
                int id = int.Parse(_protector.Unprotect(encryptId));
                await service.DeleteUserPassWordById(id);

                return(await OutDataAsync());
            }
            catch (Exception e)
            {
                return(await OutErrorAsync <string>(e.Message));
            }
        }