Ejemplo n.º 1
0
 public ActionResult Create(GroupsMaster groupsMaster)
 {
     if (ModelState.IsValid)
     {
         _groupMasterService.AddGroupsMaster(groupsMaster);
         _accessDatasService.AddOperatorLog(120, permissionUser.Kullanici_Adi, groupsMaster.Grup_No, 0, 0, 0);
         if (_liftGroupsService.GetAllLiftGroups().Count() == 0 || _liftGroupsService.GetAllLiftGroups() == null)
         {
             _liftGroupsService.DeleteAll();
             LiftGroups liftGroups = new LiftGroups
             {
                 Asansor_Grup_No  = 1,
                 Asansor_Grup_Adi = "Asansör",
                 Kat_Sayisi       = 16
             };
             _liftGroupsService.AddLiftGroup(liftGroups);
         }
         var count = _timeGroupsService.GetAllTimeGroups().Count;
         var list  = _timeGroupsService.GetAllTimeGroups();
         if (_timeGroupsService.GetAllTimeGroups().Count() == 0 || _timeGroupsService.GetAllTimeGroups() == null)
         {
             _timeGroupsService.DeleteAll();
             TimeGroups timeGroups = new TimeGroups
             {
                 Zaman_Grup_No        = 1,
                 Zaman_Grup_Adi       = "Sınırlama Yok",
                 Gecis_Sinirlama_Tipi = 0,
             };
             _timeGroupsService.AddTimeGroups(timeGroups);
         }
         FillGroups();
         return(RedirectToAction("Groups", "AccessGroup"));
     }
     return(View(groupsMaster));
 }
Ejemplo n.º 2
0
        // AGG Listesi
        public ActionResult LiftGroups()
        {
            if (permissionUser.SysAdmin == false)
            {
                if (permissionUser.Grup_Islemleri == (int)SecurityCode.Yetkisiz)
                {
                    throw new Exception("Yetkisiz Erişim!");
                }
            }


            var model = new LiftGroupsListViewModel
            {
                LiftGroup    = _liftGroupsService.GetAllLiftGroups(),
                PanelListesi = _reportService.PanelListesi(user)
            };

            return(View(model));
        }