public ActionResult View(string AplyNo, TreasuryAccessViewModel data, Ref.OpenPartialViewType type) { ViewBag.OPVT = type; ViewBag.dBILL_Check_Type = new SelectList(Bill.GetCheckType(), "Value", "Text"); var ibs = Bill.GetIssuing_Bank(); ViewBag.dBILL_Issuing_Bank = new SelectList(ibs, "Value", "Text"); var _dActType = GetActType(type, AplyNo); //畫面是否可以CRUD if (AplyNo.IsNullOrWhiteSpace()) { ViewBag.dAccess = null; Cache.Invalidate(CacheList.TreasuryAccessViewData); Cache.Set(CacheList.TreasuryAccessViewData, data); ResetBillViewModel(data.vAccessType); } else { var viewModel = TreasuryAccess.GetTreasuryAccessViewModel(AplyNo); ViewBag.dAccess = viewModel.vAccessType; if (viewModel.vAccessType == Ref.AccessProjectTradeType.G.ToString()) { _dActType = false; //空白票據 取出預設只能檢視 } Cache.Invalidate(CacheList.TreasuryAccessViewData); Cache.Set(CacheList.TreasuryAccessViewData, viewModel); ResetBillViewModel(viewModel.vAccessType, AplyNo); } ViewBag.dActType = _dActType; return(PartialView()); }