Exemple #1
0
 /// <summary>
 ///  To edit content developer details in grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lnkEdit_Click(object sender, EventArgs e)
 {
     LinkButton          lnk       = sender as LinkButton;
     GridViewRow         row       = (GridViewRow)lnk.Parent.Parent;
     int                 idx       = row.RowIndex;
     int                 intResult = 0;
     bool                Status;
     int                 CDID;
     ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
     LinkButton          lblIsActive         = (GrdContentDeveloper.Rows[idx].FindControl("lnkEdit") as LinkButton);
     Label               lblstatus           = (GrdContentDeveloper.Rows[idx].FindControl("lnkStatus") as Label);
     {
         if (lblstatus.Text == "Active" || lblstatus.Text == "True")
         {
             Status           = false;
             lblstatus.Text   = "InActive";
             lblIsActive.Text = "Activate";
         }
         else
         {
             Status           = true;
             lblstatus.Text   = "Active";
             lblIsActive.Text = "Deactivate";
         }
         CDID             = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = CDID.ToString();
         Session["CDID"]  = lblSelectID.Text;
         intResult        = ContentDeveloperBAL.UpdateContentDeveloper(CDID, Status, LoginUser, Ret);
     }
 }
Exemple #2
0
        /// <summary>
        /// Retrieves identification info from the CD in a drive.
        /// </summary>
        /// <param name="Drive">The drive... 0 = the first drive.</param>
        /// <param name="ID">The identification to retrieve. For <see cref="CDID.Text"/> use <see cref="GetIDText"/>.</param>
        /// <returns>The identication info on success, else<see langword="null" />. Use <see cref="Bass.LastError" /> to get the error code.</returns>
        /// <exception cref="Errors.Device"><paramref name="Drive" /> is invalid.</exception>
        /// <exception cref="Errors.NoCD">There's no CD in the drive.</exception>
        /// <exception cref="Errors.Parameter"><paramref name="ID" /> is invalid.</exception>
        /// <exception cref="Errors.NotAvailable">The CD does not have a UPC, ISRC or CD-TEXT info, or the CDDB Read entry number is not valid.</exception>
        /// <exception cref="Errors.Unknown">Some other mystery problem!</exception>
        public static string GetID(int Drive, CDID ID)
        {
            var ptr = BASS_CD_GetID(Drive, ID);

            switch (ID)
            {
            case CDID.Text:
                throw new InvalidOperationException($"Use {nameof(GetIDText)} overload instead.");

            case CDID.Query:
            case CDID.Read:
            case CDID.ReadCache:
                return(Extensions.PtrToStringUtf8(ptr));

            default:
                return(Marshal.PtrToStringAnsi(ptr));
            }
        }
Exemple #3
0
 static extern IntPtr BASS_CD_GetID(int Drive, CDID ID);