Exemple #1
0
        private void frmAddSong_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmSong frm = new frmSong();

            frm.MdiParent   = Application.OpenForms["frmIndex"];
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
        private async void btnSaveEditedSong_Click(object sender, EventArgs e)
        {
            if (this.ValidateChildren())
            {
                SongInsertRequest req = new SongInsertRequest();
                req.Title   = txtName.Text;
                req.Text    = txtLyrics.Text;
                req.AlbumId = (int)cmbAlbum.SelectedValue;

                await _songService.Update <SongGetRequest>(_songId, req);

                Helper.HelperMethods.CloseAllForms();
                frmSong frm = new frmSong();
                frm.MdiParent   = Application.OpenForms["frmIndex"];
                frm.WindowState = FormWindowState.Maximized;
                frm.Show();
            }
        }
Exemple #3
0
        private async void btnFinish_Click(object sender, EventArgs e)
        {
            if (this.ValidateChildren())
            {
                SongInsertRequest req = new SongInsertRequest();
                req.Title   = txtName.Text;
                req.Text    = txtLyrics.Text;
                req.AlbumId = (int)cmbAlbum.SelectedValue;

                await _songService.Insert <SongInsertRequest>(req, "AddSong");

                this.Close();
                frmSong frm = new frmSong();
                frm.Show();
                frm.MdiParent   = Application.OpenForms["frmIndex"];
                frm.WindowState = FormWindowState.Maximized;
            }
        }