Franken_.App_Code.GlyphImage.Save C# (CSharp) Method

Save() public method

public Save ( ) : void
return void
        public void Save()
        {
            if (this.ID == "")
            {
                this.ID = db.GetNewID("images");
                db.ExecuteCommand("insert into images (img_id, img_glyph_id, img_path, img_status) values (" + this.ID + ", " + this.GlyphID + ", '" + db.FixString(this.Path) + "', '" + db.FixString(this.Status) + "')");
            }
            else
            {
                db.ExecuteCommand("update images set img_glyph_id = " + this.GlyphID + ", " +
                    "img_path = '" + db.FixString(this.Path) + "', " +
                    "img_status = '" + db.FixString(this.Status) + "' " +
                    "where img_id = " + this.ID);
            }
        }

Usage Example

Example #1
0
        public void AddImage(string ImagePath)
        {
            GlyphImage GI = new GlyphImage();

            GI.GlyphID = this.ID;
            GI.Path    = ImagePath;
            GI.Save();
            this.Images.Add(GI);
        }
All Usage Examples Of Franken_.App_Code.GlyphImage::Save