Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        QueryTree IWebQueryManager.GetQueryTree(CommonOperationArguments otherArgs)
        {
            var result =
                Operation <WebQueryManagerAppService.GetQueryTreeAppOperation, QueryTree>()
                .Invoke(
                    new GetQueryTreeAppOperationOptions
            {
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 4
0
        PageMetadata IWebQueryManager.GetPageMetadata(CommonOperationArguments otherArgs)
        {
            var result =
                Operation <WebQueryManagerAppService.GetPageMetadataAppOperation, PageMetadata>()
                .Invoke(
                    new GetPageMetadataAppOperationOptions
            {
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 5
0
        ShortSensor ISdrnsController.GetShortSensor(SensorIdentifier sensorId, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.GetShortSensorAppOperation, ShortSensor>()
                .Invoke(
                    new GetShortSensorAppOperationOptions
            {
                SensorId  = sensorId,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 6
0
        QueryMetadata IWebQueryManager.GetQueryMetadata(QueryReference queryRef, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <WebQueryManagerAppService.GetQueryMetadataAppOperation, QueryMetadata>()
                .Invoke(
                    new GetQueryMetadataAppOperationOptions
            {
                QueryRef  = queryRef,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 7
0
        QueryChangesResult IWebQueryManager.SaveChanges(QueryChangeset changeset, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <WebQueryManagerAppService.SaveChangesAppOperation, QueryChangesResult>()
                .Invoke(
                    new SaveChangesAppOperationOptions
            {
                Changeset = changeset,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 8
0
        QueryResult IWebQueryManager.ExecuteQuery(QueryOptions options, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <WebQueryManagerAppService.ExecuteQueryAppOperation, QueryResult>()
                .Invoke(
                    new ExecuteQueryAppOperationOptions
            {
                Options   = options,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 9
0
        MeasTaskIdentifier ISdrnsController.CreateMeasTask(MeasTask task, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.CreateMeasTaskAppOperation, MeasTaskIdentifier>()
                .Invoke(
                    new CreateMeasTaskAppOperationOptions
            {
                Task      = task,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 10
0
        MeasTask ISdrnsController.GetMeasTask(MeasTaskIdentifier taskId, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.GetMeasTaskAppOperation, MeasTask>()
                .Invoke(
                    new GetMeasTaskAppOperationOptions
            {
                TaskId    = taskId,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 11
0
        ShortSensor[] ISdrnsController.GetShortSensors(DataConstraint constraint, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.GetShortSensorsAppOperation, ShortSensor[]>()
                .Invoke(
                    new GetShortSensorsAppOperationOptions
            {
                Constraint = constraint,
                OtherArgs  = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 12
0
        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);
        }
Ejemplo n.º 13
0
        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);
            }
        }
Ejemplo n.º 14
0
        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);
        }
Ejemplo n.º 15
0
        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);
        }
Ejemplo n.º 16
0
        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);
        }
Ejemplo n.º 17
0
        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);
        }
Ejemplo n.º 18
0
        ShortMeasurementResults[] ISdrnsController.GetShortMeasResultsByTaskId(MeasTaskIdentifier taskId, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.GetShortMeasResultsByTaskIdAppOperation, ShortMeasurementResults[]>()
                .Invoke(
                    new GetShortMeasResultsByTaskIdAppOperationOptions
            {
                TaskId    = taskId,
                OtherArgs = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }
Ejemplo n.º 19
0
        MeasurementResults ISdrnsController.GetMeasResultsById(MeasurementResultsIdentifier measResultsId, CommonOperationArguments otherArgs)
        {
            var result =
                Operation <SdrnsControllerAppService.GetMeasResultsByIdAppOperation, MeasurementResults>()
                .Invoke(
                    new GetMeasResultsByIdAppOperationOptions
            {
                MeasResultsId = measResultsId,
                OtherArgs     = otherArgs
            },
                    this.OperationContext
                    );

            return(result);
        }