Ejemplo n.º 1
0
        public ActionResult Liste()
        {
            var jsonresult = Json(new { data = _visitorsService.GetAllVisitors().OrderByDescending(x => x.Kayit_No).ToList() }, JsonRequestBehavior.AllowGet);

            jsonresult.MaxJsonLength = int.MaxValue;
            return(jsonresult);
        }
        // GET: VisitorReport
        public ActionResult Index(VisitorReportParameters parameters)
        {
            List <Visitors> visitors = new List <Visitors>();

            var liste = _reportService.GetZiyaretciListesi(parameters);
            var panel = _panelSettingsService.GetAllPanelSettings(x => x.Panel_IP1 != 0 && x.Panel_IP1 != 0 && x.Panel_TCP_Port != 0 && x.Panel_ID != 0 && dbPanelList.Contains((int)x.Panel_ID));

            visitors = _visitorsService.GetAllVisitors();
            var groupsdetail   = _groupMasterService.GetAllGroupsMaster();
            var globalBolgeAdi = _globalZoneService.GetAllGlobalZones();
            var model          = new VisitorsList
            {
                ComplexVisitorsListesi = liste,
                Panel = panel.Select(a => new SelectListItem
                {
                    Text  = a.Panel_Name,
                    Value = a.Panel_ID.ToString()
                }),
                Visitors    = visitors,
                Gecis_Grubu = groupsdetail.Select(a => new SelectListItem
                {
                    Text  = a.Grup_Adi,
                    Value = a.Grup_No.ToString()
                }),
                Global_Kapi_Bolgesi = globalBolgeAdi.Select(a => new SelectListItem
                {
                    Text  = a.Global_Bolge_Adi,
                    Value = a.Global_Bolge_No.ToString()
                }),
            };

            TempData["VisitorsList"]    = liste;
            TempData["DateAndTime"]     = ReportParamatersDateAndTime.ParametersDateAndTimeBindForReport(parameters.Baslangic_Tarihi, parameters.Bitis_Tarihi, parameters.Baslangic_Saati, parameters.Bitis_Saati);
            TempData["DateAndTimeView"] = ReportParamatersDateAndTime.ParametersDateAndTimeBindForReport(parameters.Baslangic_Tarihi, parameters.Bitis_Tarihi, parameters.Baslangic_Saati, parameters.Bitis_Saati);
            return(View(model));
        }
Ejemplo n.º 3
0
        // GET: ReportPersonelAktif
        public ActionResult Index(ActiveUserReportParameters parameters)
        {
            var panel           = _panelSettingsService.GetAllPanelSettings(x => x.Panel_IP1 != null && x.Panel_IP1 != 0 && x.Panel_TCP_Port != 0 && x.Panel_ID != 0 && dbPanelList.Contains((int)x.Panel_ID));
            var groupsdetail    = _groupMasterService.GetAllGroupsMaster();
            var globalBolgeAdi  = _globalZoneService.GetAllGlobalZones();
            var departmanlar    = _departmanService.GetAllDepartmanlar(x => dbDepartmanList.Contains(x.Departman_No)); //_departmanService.GetByKullaniciAdi(user.Kullanici_Adi);
            var bloklar         = _bloklarService.GetAllBloklar();
            var sirketler       = _sirketService.GetAllSirketler(x => dbSirketList.Contains(x.Sirket_No));             //_sirketService.GetByKullaniciAdi(user.Kullanici_Adi);
            var groupMaster     = _groupMasterService.GetAllGroupsMaster();
            var visitors        = _visitorsService.GetAllVisitors();
            var liste           = _reportService.GetReportPersonelLists(parameters, CurrentSession.User);
            var kullanicilar    = _reportService.GetPersonelLists(null, CurrentSession.User);
            var alddepartmanlar = _altDepartmanService.GetAllAltDepartman(x => x.Departman_No == parameters.Departman && dbAltDepartmanList.Contains(x.Alt_Departman_No));
            var unvanlar        = _unvanService.GetAllUnvan();
            var bolumler        = _bolumService.GetAllBolum(x => x.Alt_Departman_No == parameters.AltDepartman && x.Departman_No == parameters.Departman);
            var birimler        = _birimService.GetAllBirim(x => x.Departman_No == parameters.Departman && x.Alt_Departman_No == parameters.AltDepartman && x.Bolum_No == parameters.Bolum);
            var model           = new ReportPersonelViewModel
            {
                ReportPersonel   = liste,
                Kullanıcı        = kullanicilar,
                EskiKullanicilar = null,
                Panel            = panel.Select(a => new SelectListItem
                {
                    Text  = a.Panel_Name,
                    Value = a.Panel_ID.ToString()
                }),
                Global_Kapi_Bolgesi = globalBolgeAdi.Select(a => new SelectListItem
                {
                    Text  = a.Global_Bolge_Adi,
                    Value = a.Global_Bolge_No.ToString()
                }),
                Departman = departmanlar.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Departman_No.ToString()
                }),
                Blok = bloklar.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Blok_No.ToString()
                }),
                Sirket = sirketler.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Sirket_No.ToString()
                }),
                Gecis_Grubu = groupMaster.Select(a => new SelectListItem
                {
                    Text  = a.Grup_Adi,
                    Value = a.Grup_No.ToString()
                }),
                AltDepartman = alddepartmanlar.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Alt_Departman_No.ToString()
                }),
                Unvan = unvanlar.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Unvan_No.ToString()
                }),
                Bolum = bolumler.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Bolum_No.ToString()
                }),
                Birim_No = birimler.Select(a => new SelectListItem
                {
                    Text  = a.Adi,
                    Value = a.Birim_No.ToString()
                })
            };

            TempData["ReportPersonel"]  = liste;
            TempData["DateAndTime"]     = ReportParamatersDateAndTime.ParametersDateAndTimeBindForReport(parameters.Baslangic_Tarihi, parameters.Bitis_Tarihi, parameters.Baslangic_Saati, parameters.Bitis_Saati);
            TempData["DateAndTimeView"] = ReportParamatersDateAndTime.ParametersDateAndTimeBindForReport(parameters.Baslangic_Tarihi, parameters.Bitis_Tarihi, parameters.Baslangic_Saati, parameters.Bitis_Saati);
            return(View(model));
        }