public PersonelListReportController(IUserService userService, IDepartmanService departmanService, IBloklarService bloklarService, IGroupMasterService groupMasterService, ISirketService sirketService, IGlobalZoneService globalZoneService, IReportService reportService, IAltDepartmanService altDepartmanService, IUnvanService unvanService, IBolumService bolumService, IAccessDatasService accessDatasService, IBirimService birimService, IDBUsersDepartmanService dBUsersDepartmanService, IDBUsersSirketService dBUsersSirketService, IDBUsersPanelsService dBUsersPanelsService, IDBUsersAltDepartmanService dBUsersAltDepartmanService) { //user = CurrentSession.User; //if (user == null) //{ // user = new DBUsers(); //} _userService = userService; _departmanService = departmanService; _bloklarService = bloklarService; _groupMasterService = groupMasterService; _sirketService = sirketService; _globalZoneService = globalZoneService; _reportService = reportService; _altDepartmanService = altDepartmanService; _unvanService = unvanService; _bolumService = bolumService; _accessDatasService = accessDatasService; _birimService = birimService; _dBUsersPanelsService = dBUsersPanelsService; _dBUsersDepartmanService = dBUsersDepartmanService; _dBUsersSirketService = dBUsersSirketService; _dBUsersAltDepartmanService = dBUsersAltDepartmanService; dbDepartmanList = new List <int>(); dbPanelList = new List <int>(); dbSirketList = new List <int>(); dbAltDepartmanList = new List <int>(); foreach (var dbUserDepartmanNo in _dBUsersDepartmanService.GetAllDBUsersDepartman(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Departman_No)) { dbDepartmanList.Add((int)dbUserDepartmanNo); } foreach (var dbUserPanelNo in _dBUsersPanelsService.GetAllDBUsersPanels(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Panel_No)) { dbPanelList.Add((int)dbUserPanelNo); } foreach (var dbUserSirketNo in _dBUsersSirketService.GetAllDBUsersSirket(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Sirket_No)) { dbSirketList.Add((int)dbUserSirketNo); } foreach (var dbUserAltDepartmanNo in _dBUsersAltDepartmanService.GetAllDBUsersAltDepartman(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Alt_Departman_No)) { dbAltDepartmanList.Add((int)dbUserAltDepartmanNo); } _reportService.GetPanelList(user == null ? new DBUsers { } : user); _reportService.GetSirketList(user == null ? new DBUsers { } : user); _reportService.GetDepartmanList(user == null ? new DBUsers { } : user); _reportService.GetAltDepartmanList(user == null ? new DBUsers { } : user); _reportService.GetBolumList(user == null ? new DBUsers { } : user); }
public BlockController(IBloklarService bloklarService, IDBUsersService dBUsersService, IAccessDatasService accessDatasService) { user = CurrentSession.User; if (user == null) { user = new DBUsers(); } _bloklarService = bloklarService; _dBUsersService = dBUsersService; _accessDatasService = accessDatasService; permissionUser = _dBUsersService.GetAllDBUsers().Find(x => x.Kullanici_Adi == user.Kullanici_Adi); }
public ReportPersonelController(ISirketService sirketService, IDepartmanService departmanService, IBloklarService bloklarService, IVisitorsService visitorsService, IPanelSettingsService panelSettingsService, IGlobalZoneService globalZoneService, IGroupMasterService groupMasterService, IUserService userService, IReportService reportService, IUsersOLDService usersOLDService, IDBUsersPanelsService dBUsersPanelsService, IDoorNamesService doorNamesService, IDBUsersService dBUsersService, IAltDepartmanService altDepartmanService, IUnvanService unvanService, IBolumService bolumService, ITaskListService taskListService, IAccessDatasService accessDatasService, IBirimService birimService, IReaderSettingsNewService readerSettingsNewService, IDBUsersDepartmanService dBUsersDepartmanService, IDBUsersSirketService dBUsersSirketService, IDBUsersAltDepartmanService dBUsersAltDepartmanService, IDBUsersKapiService dBUsersKapiService) { //user = CurrentSession.User; //if (user == null) //{ // user = new DBUsers(); //} _userService = userService; _sirketService = sirketService; _departmanService = departmanService; _bloklarService = bloklarService; _visitorsService = visitorsService; _panelSettingsService = panelSettingsService; _globalZoneService = globalZoneService; _groupMasterService = groupMasterService; _reportService = reportService; _usersOLDService = usersOLDService; _dBUsersPanelsService = dBUsersPanelsService; _doorNamesService = doorNamesService; _dBUsersService = dBUsersService; _altDepartmanService = altDepartmanService; _unvanService = unvanService; _bolumService = bolumService; _taskListService = taskListService; _accessDatasService = accessDatasService; _birimService = birimService; _dBUsersKapiService = dBUsersKapiService; _readerSettingsNewService = readerSettingsNewService; _dBUsersDepartmanService = dBUsersDepartmanService; _dBUsersSirketService = dBUsersSirketService; _dBUsersAltDepartmanService = dBUsersAltDepartmanService; dbDepartmanList = new List <int>(); dbPanelList = new List <int>(); dbDoorList = new List <int>(); dbSirketList = new List <int>(); dbAltDepartmanList = new List <int>(); _reportService.GetPanelList(user == null ? new DBUsers { } : user); _reportService.GetDoorList(user == null ? new DBUsers { } : user); _reportService.GetSirketList(user == null ? new DBUsers { } : user); _reportService.GetDepartmanList(user == null ? new DBUsers { } : user); _reportService.GetAltDepartmanList(user == null ? new DBUsers { } : user); _reportService.GetBolumList(user == null ? new DBUsers { } : user); foreach (var dbUserDepartmanNo in _dBUsersDepartmanService.GetAllDBUsersDepartman(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Departman_No)) { dbDepartmanList.Add((int)dbUserDepartmanNo); } foreach (var dbUserPanelNo in _dBUsersPanelsService.GetAllDBUsersPanels(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Panel_No)) { dbPanelList.Add((int)dbUserPanelNo); } foreach (var dbUserDoorNo in _dBUsersKapiService.GetAllDBUsersKapi(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Kapi_Kayit_No)) { dbDoorList.Add((int)dbUserDoorNo); } foreach (var dbUserSirketNo in _dBUsersSirketService.GetAllDBUsersSirket(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Sirket_No)) { dbSirketList.Add((int)dbUserSirketNo); } foreach (var dbUserAltDepartmanNo in _dBUsersAltDepartmanService.GetAllDBUsersAltDepartman(x => x.Kullanici_Adi == user.Kullanici_Adi).Select(a => a.Alt_Departman_No)) { dbAltDepartmanList.Add((int)dbUserAltDepartmanNo); } }