コード例 #1
0
ファイル: Media.cs プロジェクト: chrisnunciato/littlegeek
 public void SetMediaInfo(Types.MediaInfoTypes infoType, string info)
 {
     DataConnector dc = new DataConnector();
     dc.ExecuteSql(SQLString.CreateMediaInfo(this, infoType, info));
 }
コード例 #2
0
ファイル: Media.cs プロジェクト: chrisnunciato/littlegeek
        /// <summary>
        /// Saves descriptive information in the backing store (e.g, the database).
        /// </summary>
        public void Create()
        {
            DataConnector dc = new DataConnector();
            DataSet ds = dc.GetSet(SQLString.CreateContent(Types.ContentTypes.Media.GetHashCode(), 1));

            this.contentID = Convert.ToInt32(ds.Tables[0].Rows[0]["ContentID"]);

            ds = dc.GetSet(SQLString.CreateMedia(this));

            // If a title's been set, use it
            if (this.Title != String.Empty)
            {
                dc.ExecuteSql(SQLString.CreateTitle(this));
            }

            // If a caption's been set, use that
            if (this.Caption != String.Empty)
            {
                dc.ExecuteSql(SQLString.CreateCaption(this));
            }
        }