public ActionResult View(int DeviceId)
        {
            this._provider = new UsersConfigurationService(DomainSession.GetAlarmConfigForContextWithDeviceId(this.HttpContext, DeviceId));
            AlarmSystemUserConfigModel model = new AlarmSystemUserConfigModel(this._provider.GetAll());

            return(View(model));
        }
        public ActionResult Remove(int Id)
        {
            this._provider = new UsersConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext));
            AlarmSystemUserConfigModel model = new AlarmSystemUserConfigModel(_provider.GetAll());
            bool remRes = _provider.RemoveById(Id);

            model.Result = StatusResponseGenerator.GetStatusResponseResultForReturnParam(remRes);
            return(View(model));
        }
        public ActionResult Search(string key)
        {
            this._provider = new UsersConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext));
            AlarmSystemUserConfigModel model = new AlarmSystemUserConfigModel(_provider.GetAll());

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