public static Sensor GetSensorById(int sensorId) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.GetSensor(new SensorIdentifier { Value = sensorId }, otherArgs)); return(result); }
public static MeasTask GetMeasTaskById(int taskId) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.GetMeasTask(new MeasTaskIdentifier { Value = taskId }, otherArgs)); return(result); }
QueryTree IWebQueryManager.GetQueryTree(CommonOperationArguments otherArgs) { var result = Operation <WebQueryManagerAppService.GetQueryTreeAppOperation, QueryTree>() .Invoke( new GetQueryTreeAppOperationOptions { OtherArgs = otherArgs }, this.OperationContext ); return(result); }
PageMetadata IWebQueryManager.GetPageMetadata(CommonOperationArguments otherArgs) { var result = Operation <WebQueryManagerAppService.GetPageMetadataAppOperation, PageMetadata>() .Invoke( new GetPageMetadataAppOperationOptions { OtherArgs = otherArgs }, this.OperationContext ); return(result); }
ShortSensor ISdrnsController.GetShortSensor(SensorIdentifier sensorId, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.GetShortSensorAppOperation, ShortSensor>() .Invoke( new GetShortSensorAppOperationOptions { SensorId = sensorId, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
QueryMetadata IWebQueryManager.GetQueryMetadata(QueryReference queryRef, CommonOperationArguments otherArgs) { var result = Operation <WebQueryManagerAppService.GetQueryMetadataAppOperation, QueryMetadata>() .Invoke( new GetQueryMetadataAppOperationOptions { QueryRef = queryRef, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
QueryChangesResult IWebQueryManager.SaveChanges(QueryChangeset changeset, CommonOperationArguments otherArgs) { var result = Operation <WebQueryManagerAppService.SaveChangesAppOperation, QueryChangesResult>() .Invoke( new SaveChangesAppOperationOptions { Changeset = changeset, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
QueryResult IWebQueryManager.ExecuteQuery(QueryOptions options, CommonOperationArguments otherArgs) { var result = Operation <WebQueryManagerAppService.ExecuteQueryAppOperation, QueryResult>() .Invoke( new ExecuteQueryAppOperationOptions { Options = options, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
MeasTaskIdentifier ISdrnsController.CreateMeasTask(MeasTask task, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.CreateMeasTaskAppOperation, MeasTaskIdentifier>() .Invoke( new CreateMeasTaskAppOperationOptions { Task = task, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
MeasTask ISdrnsController.GetMeasTask(MeasTaskIdentifier taskId, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.GetMeasTaskAppOperation, MeasTask>() .Invoke( new GetMeasTaskAppOperationOptions { TaskId = taskId, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
ShortSensor[] ISdrnsController.GetShortSensors(DataConstraint constraint, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.GetShortSensorsAppOperation, ShortSensor[]>() .Invoke( new GetShortSensorsAppOperationOptions { Constraint = constraint, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
public static ShortMeasTask[] GetShortMeasTasks(DataConstraint constraint) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.GetShortMeasTasks(constraint, otherArgs)); if (result == null) { return(new ShortMeasTask[] { }); } return(result); }
public static void StopMeasTask(int taskId) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.StopMeasTask(new MeasTaskIdentifier { Value = taskId }, otherArgs)); if (result.State == CommonOperationState.Fault) { System.Windows.Forms.MessageBox.Show(result.FaultCause ?? "Unknown error", $"Stop the meas task with Id #{taskId}", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } }
public static int CreateMeasTask(MeasTask task) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.CreateMeasTask(task, otherArgs)); if (result == null) { return(IM.NullI); } return(result.Value); }
public static ShortMeasurementResults[] GetShortMeasResultsByTask(int taskId) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var result = Execute(contract => contract.GetShortMeasResultsByTaskId(new MeasTaskIdentifier { Value = taskId }, otherArgs)); if (result == null) { return(new ShortMeasurementResults[] { }); } return(result); }
public static MeasurementResults GetMeasResultsById(int measSdrResultsId, int measTaskId, int subMeasTaskId, int subMeasTaskStationId) { var otherArgs = new CommonOperationArguments() { UserId = MD.Employee.GetCurrentUserId() }; var id = new MeasurementResultsIdentifier { MeasSdrResultsId = measSdrResultsId, MeasTaskId = new MeasTaskIdentifier { Value = measTaskId }, SubMeasTaskId = subMeasTaskId, SubMeasTaskStationId = subMeasTaskStationId }; var result = Execute(contract => contract.GetMeasResultsById(id, otherArgs)); return(result); }
CommonOperationDataResult <int> ISdrnsController.DeleteMeasResults(DataConstraint constraint, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.DeleteMeasResultsAppOperation, CommonOperationDataResult <int> >() .Invoke( new DeleteMeasResultsAppOperationOptions { Constraint = constraint, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
ShortMeasurementResults[] ISdrnsController.GetShortMeasResultsByTaskId(MeasTaskIdentifier taskId, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.GetShortMeasResultsByTaskIdAppOperation, ShortMeasurementResults[]>() .Invoke( new GetShortMeasResultsByTaskIdAppOperationOptions { TaskId = taskId, OtherArgs = otherArgs }, this.OperationContext ); return(result); }
MeasurementResults ISdrnsController.GetMeasResultsById(MeasurementResultsIdentifier measResultsId, CommonOperationArguments otherArgs) { var result = Operation <SdrnsControllerAppService.GetMeasResultsByIdAppOperation, MeasurementResults>() .Invoke( new GetMeasResultsByIdAppOperationOptions { MeasResultsId = measResultsId, OtherArgs = otherArgs }, this.OperationContext ); return(result); }