Exemplo n.º 1
0
        private void picSavePlaylist_Click(object sender, EventArgs e)
        {
            string lStr = "";

            try
            {
                lStr = "select * from Playlists where  ispredefined=1 and name='" + txtPlaylistName.Text + "' and PlaylistID <>  " + ModifyPlaylistId;
                DataSet ds = new DataSet();
                ds = ObjMainClass.fnFillDataSet(lStr);

                if (txtPlaylistName.Text == "")
                {
                    MessageBox.Show("The playlist cannot be empty or without a name.", "Management Panel");
                    return;
                }
                else if (ds.Tables[0].Rows.Count > 0)
                {
                    MessageBox.Show("This playlist name is already used.", "Management Panel");
                    return;
                }

                if (pAction == "New")
                {
                    PlaylistSave();
                    txtPlaylistName.Text = "";
                    pAction = "New";
                }
                else
                {
                    PlaylistModify();
                    txtPlaylistName.Text = "";
                    pAction = "New";
                }
                FillLocalPlaylist();
                ModifyPlaylistId = 0;
            }
            catch
            {
                return;
            }
        }
Exemplo n.º 2
0
        public void SubmitValidation()
        {
            try
            {
                string str = "";
                str = "select * from tbAdministratorLogin where loginid='" + txtloginUserName.Text + "'";
                DataSet ds = new DataSet();
                ds = ObjMainClass.fnFillDataSet(str);
                if (txtloginUserName.Text == "")
                {
                    MessageBox.Show("The login user name cannot be empty", "Panel");
                    SubmitValidate = "False";
                }
                else if (txtLoginPassword.Text == "")
                {
                    MessageBox.Show("Login password cannot be blank", "Panel");
                    SubmitValidate = "False";
                }
                else if (ds.Tables[0].Rows.Count <= 0)
                {
                    MessageBox.Show("Login user/password is wrong", "Panel");
                    SubmitValidate = "False";
                }
                else if (ds.Tables[0].Rows.Count > 0)
                {
                    string h = Decryptdata(ds.Tables[0].Rows[0]["password"].ToString());

                    if (Decryptdata(ds.Tables[0].Rows[0]["password"].ToString()) == txtLoginPassword.Text.ToString())
                    {
                        SubmitValidate = "True";
                        LoginOTP       = GetOTP();
                        //string sp = "";
                        //sp = "update tbAdministratorLogin set OTP='" + LoginOTP + "' where loginid='" + txtloginUserName.Text + "'";
                        //if (StaticClass.constr.State == ConnectionState.Open) StaticClass.constr.Close();
                        //StaticClass.constr.Open();
                        //SqlCommand cmd = new SqlCommand(sp, StaticClass.constr);
                        //cmd.CommandType = CommandType.Text;
                        //cmd.ExecuteNonQuery();
                    }
                    else
                    {
                        SubmitValidate = "False";
                    }
                }
            }
            catch (Exception ex) { }
        }
Exemplo n.º 3
0
        private void picAddtoPlaylist_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(cmbCustomer.SelectedValue) == 0)
            {
                MessageBox.Show("Please select a customer name", "Management Panel");
                return;
            }
            string ContentType = "";

            if (rdoCopyright.Checked == true)
            {
                ContentType = "CR";
            }
            if (rdoRoyalty.Checked == true)
            {
                ContentType = "RF";
            }
            if (rdoVideoType.Checked == true)
            {
                ContentType = "Video";
            }
            string lStr;

            try
            {
                for (int i = 0; i < dgCommanGrid.Rows.Count; i++)
                {
                    if (dgCommanGrid.Rows[i].Selected == true)
                    {
                        //If already song add in playlist then this step:-
                        lStr = "select * from tbDealerContent where  TitleID=" + dgCommanGrid.Rows[i].Cells[0].Value + " and ContentType='" + ContentType + "'";

                        DataSet ds = new DataSet();
                        ds = objMainClass.fnFillDataSet(lStr);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                        }
                        else
                        {
                            string TitleTime  = "";
                            string Title_id   = "";
                            string Title      = "";
                            string AlbumName  = "";
                            string ArtistName = "";
                            Title_id   = dgCommanGrid.Rows[i].Cells["songid"].Value.ToString();
                            Title      = dgCommanGrid.Rows[i].Cells["songname"].Value.ToString();
                            TitleTime  = dgCommanGrid.Rows[i].Cells["Length"].Value.ToString();
                            AlbumName  = dgCommanGrid.Rows[i].Cells["album"].Value.ToString();
                            ArtistName = dgCommanGrid.Rows[i].Cells["Artist"].Value.ToString();
                            dgPlaylist.Rows.Insert(dgPlaylist.Rows.Count, Title_id, Title, TitleTime, ArtistName, AlbumName, dgCommanGrid.Rows[i].Cells["Genre"].Value.ToString(), dgCommanGrid.Rows[i].Cells["Tempo"].Value.ToString());
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["songname"].Style.Font = new Font("Segoe UI", 10, System.Drawing.FontStyle.Regular);
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["Length"].Style.Font   = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["Album"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["Artist"].Style.Font   = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["Genre"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                            dgPlaylist.Rows[dgPlaylist.Rows.Count - 1].Cells["Tempo"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);

                            Insert_DealerContent(dgCommanGrid.Rows[i].Cells[0].Value.ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }