@@ -251,7 +251,14 @@ where {where} order by {orderBy}
...
@@ -251,7 +251,14 @@ where {where} order by {orderBy}
}
}
if(!string.IsNullOrEmpty(demodel.GuestName))
if(!string.IsNullOrEmpty(demodel.GuestName))
{
{
where+=$@" o.OrderId in (select OrderId from rb_order_guest where Status =0 and GuestName like '%{demodel.GuestName}%')";
if(demodel.Group_Id>0)
{
where+=$@" and o.OrderId in (select OrderId from rb_order_guest where Status =0 and Group_Id ={demodel.Group_Id} and GuestName like '%{demodel.GuestName}%')";
}
else
{
where+=$@" and o.OrderId in (select OrderId from rb_order_guest where Status =0 and GuestName like '%{demodel.GuestName}%')";