public ActionResult Remove(int Id)
        {
            this._provider = new GsmConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext));
            AlarmSystemGsmConfigModel model = new AlarmSystemGsmConfigModel(_provider.GetAll());
            bool remRes = _provider.RemoveById(Id);

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

            if (!String.IsNullOrEmpty(key))
            {
                model.GsmRcpts = model.GsmRcpts.Where(d => d.NumberE164.Contains(key) || d.Name.Contains(key)).ToList();
            }
            return(View(model));
        }
예제 #3
0
 private void GetData()
 {
     try
     {
         Config = new ObservableCollection <sconnGsmRcpt>(_provider.GetAll());
     }
     catch (Exception ex)
     {
         _nlogger.Error(ex, ex.Message);
     }
 }