Beispiel #1
0
 public MapTemplateClass(int int_1, MapCartoTemplateLib.MapTemplateGallery mapTemplateGallery_1)
 {
     this.OID = int_1;
     this.MapTemplateGallery = mapTemplateGallery_1;
     if (int_1 == -1)
     {
         this.Guid = System.Guid.NewGuid().ToString();
     }
     else
     {
         IRow row = null;
         row = this.MapTemplateGallery.MapTemplateClassTable.GetRow(this.OID);
         try
         {
             this.Guid = RowAssisant.GetFieldValue(row, "Guid").ToString();
         }
         catch
         {
         }
         if (string.IsNullOrEmpty(this.Guid))
         {
             this.Guid = System.Guid.NewGuid().ToString();
             RowAssisant.SetFieldValue(row, "Guid", this.Guid);
             row.Store();
         }
     }
 }
Beispiel #2
0
        public virtual void Save()
        {
            IRow row = null;

            if (this.OID == -1)
            {
                row      = this.MapTemplateGallery.MapTemplateElementTable.CreateRow();
                this.OID = row.OID;
            }
            else
            {
                row = this.MapTemplateGallery.MapTemplateElementTable.GetRow(this.OID);
            }
            RowAssisant.SetFieldValue(row, "Name", this.Name);
            RowAssisant.SetFieldValue(row, "ElementType", base.GetType().ToString());
            RowAssisant.SetFieldValue(row, "Element", this.CloneElement(this.Element));
            RowAssisant.SetFieldValue(row, "TemplateID", this.MapTemplate.OID);
            RowAssisant.SetFieldValue(row, "Location", this.ElementLocation.ToString());
            RowAssisant.SetFieldValue(row, "TemplateGuid", this.TempleteGuid);
            IPropertySet propertySet = this.PropertySet;

            if (propertySet != null)
            {
                RowAssisant.SetFieldValue(row, "Attributes", this.method_2(propertySet));
            }
            row.Store();
        }
Beispiel #3
0
        public void Save()
        {
            IRow row = null;

            if (this.OID == -1)
            {
                row = this.MapTemplateGallery.MapTemplateParamTable.CreateRow();
                RowAssisant.SetFieldValue(row, "MapTemplateOID", this.MapTemplate.OID);
                this.OID = row.OID;
            }
            else
            {
                row = this.MapTemplateGallery.MapTemplateParamTable.GetRow(this.OID);
            }
            RowAssisant.SetFieldValue(row, "Name", this.Name);
            RowAssisant.SetFieldValue(row, "Description", this.Description);
            RowAssisant.SetFieldValue(row, "AllowNull", this.AllowNull ? 1 : 0);
            RowAssisant.SetFieldValue(row, "DataType", (int)this.ParamDataType);
            RowAssisant.SetFieldValue(row, "TemplateGuid", this.TempleteGuid);
            row.Store();
        }