public void ControlPumpStation(Guid uid, PumpStationCommandType commandType)
		{
			ControlPumpStation(RubezhServiceFactory.UID, uid, commandType);
		}
		public void ControlPumpStation(Guid clientUID, Guid uid, PumpStationCommandType commandType)
		{
			SafeOperationCall(() =>
			{
				var rubezhService = RubezhServiceFactory.Create(TimeSpan.FromMinutes(10));
				using (rubezhService as IDisposable)
					rubezhService.ControlPumpStation(clientUID, uid, commandType);
			}, "ControlPumpStation");
		}
Example #3
0
		public static void ControlPumpStation(Guid clientUID, Guid uid, PumpStationCommandType commandType)
		{
			if (commandType == PumpStationCommandType.Automatic)
				RubezhServiceManager.SafeRubezhService.GKSetAutomaticRegime(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.Ignore)
				RubezhServiceManager.SafeRubezhService.GKSetIgnoreRegime(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.Manual)
				RubezhServiceManager.SafeRubezhService.GKSetManualRegime(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOn)
				RubezhServiceManager.SafeRubezhService.GKTurnOn(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOff)
				RubezhServiceManager.SafeRubezhService.GKTurnOff(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOnNow)
				RubezhServiceManager.SafeRubezhService.GKTurnOnNow(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOn_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOnInAutomatic(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOff_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOffInAutomatic(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.TurnOnNow_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOnNowInAutomatic(clientUID, uid, GKBaseObjectType.PumpStation);
			if (commandType == PumpStationCommandType.ForbidStart)
				RubezhServiceManager.SafeRubezhService.GKStop(clientUID, uid, GKBaseObjectType.PumpStation);
		}
		public void ControlPumpStation(Guid clientUID, Guid uid, PumpStationCommandType commandType)
		{
			ProcedureHelper.ControlPumpStation(clientUID, uid, commandType);
		}
		public static void ControlPumpStation(Guid clientUID, Guid uid, PumpStationCommandType commandType)
		{
			if (OnControlPumpStation != null)
				OnControlPumpStation(clientUID, uid, commandType);
		}