public ActionResult Edit(int Id) { AlarmSystemZoneAddModel model = new AlarmSystemZoneAddModel(); this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext)); model.Zone = _provider.GetById(Id); return(View(model)); }
public ActionResult Remove(sconnAlarmZone Zone) { AlarmSystemZoneAddModel model = new AlarmSystemZoneAddModel(); this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext)); var remRes = this._provider.Remove(Zone); model.Result = StatusResponseGenerator.GetStatusResponseResultForReturnParam(remRes); return(View(model)); }
public async Task <ActionResult> Edit(AlarmSystemZoneAddModel model) { try { this._provider = new ZoneConfigurationService(DomainSession.GetAlarmConfigForContextSession(this.HttpContext)); if (ModelState.IsValid) { var res = (_provider.Update(model.Zone)); model.Result = StatusResponseGenerator.GetStatusResponseResultForReturnParam(res); } } catch (Exception e) { model.Result = StatusResponseGenerator.GetRequestResponseCriticalError(); } return(View(model)); }
public ActionResult Add() { AlarmSystemZoneAddModel model = new AlarmSystemZoneAddModel(); return(View(model)); }