Example #1
0
        /// <summary>
        /// Updates Surveyed Surface list.
        /// </summary>
        /// <param name="args">Description of the request data.</param>
        /// <returns>True if successfully updated, false - otherwise.</returns>
        ///
        public bool UpdateGroundSurfaceFile(ASNode.GroundSurface.RPC.TASNodeServiceRPCVerb_GroundSurface_Args args)
        {
            bool result = client.GetGroundSurfaceFileDetails(args.DataModelID, out TSurveyedSurfaceDetails[] groundSurfaces) == 1;/*icsrrNoError*/

            if (!result)
            {
                return(false);
            }

            //var ss = (from surveyedSurface in groundSurfaces where surveyedSurface.ID == args.GroundSurfaceID select surveyedSurface).ToList();
            var ss = groundSurfaces.Where(surveyedSurface => surveyedSurface.ID == args.GroundSurfaceID).ToList();

            if (ss.Any())
            {
                result = client.DiscardGroundSurfaceFileDetails(args.DataModelID, args.GroundSurfaceID) == 1;/*icsrrNoError*/
            }
            if (!result)
            {
                return(false);
            }

            result = client.StoreGroundSurfaceFile(args) == 1;/*icsrrNoError*/

            return(result);
        }
Example #2
0
        /// <summary>
        /// Stores Surveyed Surface data.
        /// </summary>
        /// <param name="args">Description of the request data.</param>
        /// <returns>True if successfully saved, false - otherwise.</returns>
        ///
        public bool StoreGroundSurfaceFile(ASNode.GroundSurface.RPC.TASNodeServiceRPCVerb_GroundSurface_Args args)
        {
            bool result = client.GetGroundSurfaceFileDetails(args.DataModelID, out TSurveyedSurfaceDetails[] groundSurfaces) == 1;/*icsrrNoError*/

            if (!result)
            {
                return(false);
            }

            var ss = groundSurfaces.Where(surveyedSurface => surveyedSurface.ID == args.GroundSurfaceID).ToList();

            if (ss.Any())
            {
                return(false);
            }

            return(client.StoreGroundSurfaceFile(args) == 1);/*icsrrNoError*/
        }