public void LoadRoleAccess() { //View.RoleAccessListData = Model.RetrieveAllRoleAccess(); List <RoleAccessViewModel> list = Model.RetrieveAllRoleAccess(); foreach (var item in list) { item.Read = LoginInformation.Has(item.AccessCode, Constant.DbConstant.AccessTypeEnum.Read); item.Create = LoginInformation.Has(item.AccessCode, Constant.DbConstant.AccessTypeEnum.Create); item.Update = LoginInformation.Has(item.AccessCode, Constant.DbConstant.AccessTypeEnum.Update); item.Delete = LoginInformation.Has(item.AccessCode, Constant.DbConstant.AccessTypeEnum.Delete); } View.RoleAccessListData = list; }