Esempio n. 1
0
        private Dictionary <string, int> ValidateItems()
        {
            if (!fileAdded)
            {
                return(null);
            }

            Progress.Caption = "Obteniendo geografía padre";

            Dictionary <string, int> ci = null;

            if (iParent != "")
            {
                //Trae todos los items de la geografía padre para asociar.
                ci = context.Data.Session.Query <GeographyItem>()
                     .Where(x => x.Geography.Id == current.Parent.Id)
                     .Select(x => new { Id = x.Id.Value, x.Code })
                     .ToDictionary(x => x.Code, x => x.Id);
            }

            Progress.Caption = "Validando ítems";
            ShapeOperations.ValidateParentAndShapes(Progress, ci, Basename + ".shp", iCode, iParent);
            if (dbfMissingFilename != null)
            {
                Progress.Caption = "Validando ítems faltantes";
                ShapeOperations.ValidateParentAndShapes(Progress, ci, dbfMissingFilename, iCode, iParent);
            }
            return(ci);
        }
Esempio n. 2
0
        private Dictionary <string, int> ValidateItems()
        {
            if (!fileAdded)
            {
                return(null);
            }

            Progress.Caption = "Validando ítems";
            Dictionary <string, int> ci = null;

            if (iParent != null)
            {
                // No es países. Trae todos los items de la clipping padre para asociar.
                ci = context.Data.Session.Query <ClippingRegionItem>()
                     .Where(x => x.ClippingRegion.Id == current.Parent.Id)
                     .Select(x => new { Id = x.Id.Value, x.Code })
                     .ToDictionary(x => x.Code, x => x.Id);
            }

            ShapeOperations.ValidateParentAndShapes(Progress, ci, Basename + ".shp", iCode, iParent, skipOrphans);

            return(ci);
        }