Exemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            MediaGroupItem mediaItem = new MediaGroupItem
            {
                AssetID = txtAssetID.Text,
                FileName = txtVideoTitle.Text,
                FilePath = txtVideoFilePath.Text,
                PermanentLinkURL = txtPermanentLink.Text,
                PreviewImageURL = txtVideoPrevImage.Text,
                Sort = Int32.Parse(Sort.Text)

            };
            mediaItem.Update();

            Response.Redirect("editvideos.aspx?id=" + Request.QueryString["id"].ToString());
        }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            MediaGroupItem mediaItem = new MediaGroupItem
            {
                MediaID = itemid,
                AssetID = txtAssetID.Text,
                FileName = txtVideoTitle.Text,
                FilePath = txtVideoFilePath.Text,
                PermanentLinkURL = txtPermanentLink.Text,
                PreviewImageURL = txtVideoPrevImage.Text,
                Sort = Int32.Parse(Sort.Text)

            };
            mediaItem.Save();
            BindData();
            clearForm();
        }
Exemplo n.º 3
0
        public MediaGroupItem GetMediaGroupItem(string AssetID)
        {
            DataLayer dal = new DataLayer();
            dal.ConnectionString = ConnectionString;
            dal.Connect();

            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "GetMediaGroupItem";
            cmd.Parameters.AddWithValue("@AssetID", AssetID);

            DataTable dt = dal.Execute(cmd);

            foreach (DataRow dr in dt.Rows)
            {
                MediaGroupItem mediagroupitem = new MediaGroupItem
                {
                    MediaID = Int32.Parse(dr["MediaID"].ToString()),
                    AssetID = dr["AssetID"].ToString(),
                    FileName = dr["FileName"].ToString(),
                    PreviewImageURL = dr["PreviewImage"].ToString(),
                    FilePath = dr["FilePath"].ToString(),
                    PermanentLinkURL = dr["PermanentLink"].ToString(),
                    Sort = Int32.Parse(dr["Sort"].ToString())
                };

                return mediagroupitem;
            }

            return null;
        }