Compare commits
No commits in common. "7001fa2d2ea60399555988f9f203749703b04c98" and "d96e4a5a6ef1d036909f212b20f88e7f251fa50d" have entirely different histories.
7001fa2d2e
...
d96e4a5a6e
@ -23,7 +23,7 @@ namespace AutomobilePlantDatabaseImplement.Implements
|
|||||||
{
|
{
|
||||||
using var context = new AutomobilePlantDatabase();
|
using var context = new AutomobilePlantDatabase();
|
||||||
var messages = context.Messages
|
var messages = context.Messages
|
||||||
.Where(x => !model.ClientId.HasValue || x.ClientId == model.ClientId)
|
.Where(x => x.ClientId == model.ClientId)
|
||||||
.Select(x => x.GetViewModel)
|
.Select(x => x.GetViewModel)
|
||||||
.ToList();
|
.ToList();
|
||||||
if (!model.Page.HasValue || !model.PageSize.HasValue)
|
if (!model.Page.HasValue || !model.PageSize.HasValue)
|
||||||
|
@ -26,7 +26,7 @@ namespace AutomobilePlantFileImplement.Implements
|
|||||||
public List<MessageInfoViewModel> GetFilteredList(MessageInfoSearchModel model)
|
public List<MessageInfoViewModel> GetFilteredList(MessageInfoSearchModel model)
|
||||||
{
|
{
|
||||||
var messages = _source.Messages
|
var messages = _source.Messages
|
||||||
.Where(x => !model.ClientId.HasValue || x.ClientId == model.ClientId)
|
.Where(x => x.ClientId == model.ClientId)
|
||||||
.Select(x => x.GetViewModel)
|
.Select(x => x.GetViewModel)
|
||||||
.ToList();
|
.ToList();
|
||||||
if (!model.Page.HasValue || !model.PageSize.HasValue)
|
if (!model.Page.HasValue || !model.PageSize.HasValue)
|
||||||
|
@ -28,7 +28,7 @@ namespace AutomobilePlantListImplement.Implements
|
|||||||
List<MessageInfoViewModel> result = new();
|
List<MessageInfoViewModel> result = new();
|
||||||
foreach (var item in _source.Messages)
|
foreach (var item in _source.Messages)
|
||||||
{
|
{
|
||||||
if (!model.ClientId.HasValue || item.ClientId == model.ClientId)
|
if (item.ClientId.HasValue && item.ClientId == model.ClientId)
|
||||||
{
|
{
|
||||||
result.Add(item.GetViewModel);
|
result.Add(item.GetViewModel);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user