public Box(String name, String comment, long id, Image back, Image inlay, BoxType type, Image front, IDBLayer idb, Category parent) : base(idb, id) { this.parent = parent; this.name = name; this.desc = comment; this.type = type; this.front = front; this.back = back; this.inlay = inlay; }
public Box AddCDBox(String name, String description, BoxType type, Image frontImage, Image backImage, Image inlayImage, Category cat) { int id = DBUtils.InsertSQL(this.DBConString, "INSERT INTO [CDBoxes] ([Description], [Name], [BackImage], [InlayImage], [Type], [FrontImage], [Category]) VALUES(?, ?, ?, ?, ?, ?, ?)", new object[] {description, name, backImage.Id, inlayImage.Id, type.Id, frontImage.Id, cat.Id}); return new Box(name, description, id, backImage, inlayImage, type, frontImage, this, cat); }
public void UpdateCDBox(Box box, String newName, String newDescription, Image newBack, Image newFront, Image newInlay, BoxType newType, Category newParent) { DBUtils.UpdateSQL(this.DBConString, "UPDATE [CDBoxes] SET [Description] = ?, [Name] = ?, [BackImage] = ?, [InlayImage] = ?, [Type] = ?, [FrontImage] = ?, [Category] = ?, [LastUpdate] = NOW() WHERE [id] = ?", new object[] {newDescription, newName, newBack.Id, newInlay.Id, newType.Id, newFront.Id, newParent.Id, box.Id}); }
public Box AddCDBox(string name, string description, BoxType type, Image front, Image back, Image inlay) { CheckDeleted(); Box box = this.idb.AddCDBox(name, description, type, front, back, inlay, this); if (box != null) { OnChildAdded(box); } return box; }