Exemplo n.º 1
0
        public ActionResult View(int DeviceId)
        {
            this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextWithDeviceId(this.HttpContext, DeviceId));
            AlarmSystemZoneConfigModel model = new AlarmSystemZoneConfigModel(this._provider.GetAll());

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Remove(int Id)
        {
            this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext));
            AlarmSystemZoneConfigModel model = new AlarmSystemZoneConfigModel(_provider.GetAll());
            bool remRes = _provider.RemoveById(Id);

            model.Result = StatusResponseGenerator.GetStatusResponseResultForReturnParam(remRes);
            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult Search(string key)
        {
            this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext));
            AlarmSystemZoneConfigModel model = new AlarmSystemZoneConfigModel(_provider.GetAll());

            if (!String.IsNullOrEmpty(key))
            {
                model.ZoneConfigs = model.ZoneConfigs.Where(d => d.Name.Contains(key)).ToList();
            }
            return(View(model));
        }