protected void btnDelete_Click(object sender, EventArgs e)
 {
     if (EditVideoId > 0)
     {
         btnSaveReturn.Visible = false;
         //btnSaveContinue.Visible = false;
         btnDelete.Visible  = false;
         lblResults.Visible = true;
         VIDEO video = MediaVideoMgr.SelectVideoById(EditVideoId);
         //string filename = Server.MapPath(video.FILE_NAME);
         int delStatus = MediaVideoMgr.DeleteVideo(EditVideoId, video.FILE_NAME);
         // delete the task
         lblResults.Text  = "<div style=\"text-align: center; font-weight: bold; padding: 10px;\">";
         lblResults.Text += (delStatus == 1) ? Resources.LocalizedText.VideoDeleted : Resources.LocalizedText.VideoErrorDeleting;
         lblResults.Text += "</div>";
     }
 }
        protected void rgFiles_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem item    = (GridEditableItem)e.Item;
            decimal          videoId = (decimal)item.GetDataKeyValue("VideoId");
            VIDEO            video   = MediaVideoMgr.SelectVideoById(videoId);
            //string filename = Server.MapPath(video.FILE_NAME);
            int status = MediaVideoMgr.DeleteVideo(videoId, video.FILE_NAME);

            this.GetUploadedFiles();

            if (AttachmentEvent != null)
            {
                SessionManager.ReturnRecordID = video.VIDEO_ID;
                SessionManager.ReturnObject   = "AddVideo";
                SessionManager.ReturnStatus   = true;
                AttachmentEvent("delete");
            }
        }