Exemplo n.º 1
0
        public JsonResult Invalidate(string AplyNo)
        {
            MSGReturnModel <List <TreasuryAccessSearchDetailViewModel> > result = new MSGReturnModel <List <TreasuryAccessSearchDetailViewModel> >();

            result.RETURN_FLAG = false;
            result.DESCRIPTION = Ref.MessageType.already_Change.GetDescription();
            var searchData = (TreasuryAccessSearchViewModel)Cache.Get(CacheList.TreasuryAccessSearchData);
            var datas      = (List <TreasuryAccessSearchDetailViewModel>)Cache.Get(CacheList.TreasuryAccessSearchDetailViewData);
            var data       = datas.FirstOrDefault(x => x.vAPLY_NO == AplyNo);

            if (data != null)
            {
                result = TreasuryAccess.Invalidate(searchData, data);
                if (result.RETURN_FLAG)
                {
                    Cache.Invalidate(CacheList.TreasuryAccessSearchDetailViewData);
                    Cache.Set(CacheList.TreasuryAccessSearchDetailViewData, result.Datas);
                }
            }
            return(Json(result));
        }