RollCall Control For client in admin - checkoutPrint change
This commit is contained in:
@@ -59,21 +59,8 @@ public class CameraAccountApplication : ICameraAccountApplication
|
||||
return _cameraAccountRepository.Exists(x => x.WorkshopId == workshopId && x.AccountId == accountId);
|
||||
}
|
||||
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops)
|
||||
{
|
||||
var cameraAccounts = _cameraAccountRepository.GetAllByAccountId(accountId);
|
||||
|
||||
return cameraAccounts.Select(x => new CameraAccountViewModel()
|
||||
{
|
||||
AccountId = x.AccountId,
|
||||
Id = x.Id,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Username = x.Username,
|
||||
Mobile = x.Mobile,
|
||||
WorkshopId = x.WorkshopId,
|
||||
WorkshopName = workshops.FirstOrDefault(y => x.WorkshopId == y.Id).Name
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
public OperationResult CheckUsername(string username)
|
||||
{
|
||||
@@ -135,4 +122,27 @@ public class CameraAccountApplication : ICameraAccountApplication
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pooya
|
||||
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops)
|
||||
{
|
||||
var cameraAccounts = _cameraAccountRepository.GetAllByAccountId(accountId);
|
||||
|
||||
return cameraAccounts.Select(x => new CameraAccountViewModel()
|
||||
{
|
||||
AccountId = x.AccountId,
|
||||
Id = x.Id,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Username = x.Username,
|
||||
Mobile = x.Mobile,
|
||||
WorkshopId = x.WorkshopId,
|
||||
WorkshopName = workshops.FirstOrDefault(y => x.WorkshopId == y.Id).Name
|
||||
}).ToList();
|
||||
}
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopId(long workshopId)
|
||||
{
|
||||
return _cameraAccountRepository.GetAllByWorkshopId(workshopId);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user