Ejemplo n.º 1
0
        /// <summary>
        /// Click event to join a party
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToPartyBtn_Click(object sender, EventArgs e)
        {
//            var index = PartiesGridView.CurrentCell.RowIndex;
//            var selectedRow = PartiesGridView.Rows[index];
//            _dataStorage.CurrentSelectedPartyId = Convert.ToInt64(selectedRow.Cells["PartyId"].Value);
//            _dataStorage.adminAtParty = SetAdminPrivileges(_dataStorage.CurrentSelectedPartyId);
            SetSelectedParty();

            var userAtParty = new UsersAtParty
            {
                userID          = _dataStorage.UserId,
                partyID         = _dataStorage.CurrentSelectedPartyId,
                adminPrivileges = _dataStorage.adminAtParty,
                status          = 0
            };

            try
            {
                _service.CreateUserAtParty(userAtParty, _service.GetPartyById(userAtParty.partyID).RowVersion);
            }
            catch (FaultException ex)
            {
                var aux = new PopupWindow();
                aux.SetErrorText(ex.Message);
                aux.ShowDialog();
                return;
            }
            Hide();
            var form2 = new SeeParty();

            form2.Closed += (s, args) => Close();
            form2.Show();
        }
        private void SongsForPlaylistBtn_Click(object sender, EventArgs e)
        {
            Hide();
            var form2 = new SeeParty();

            form2.Closed += (s, args) => Close();
            form2.Show();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Click event to see a party without joining
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SeePartyBtn_Click(object sender, EventArgs e)
        {
//            var index = PartiesGridView.CurrentCell.RowIndex;
//            var selectedRow = PartiesGridView.Rows[index];
//            _dataStorage.CurrentSelectedPartyId = Convert.ToInt64(selectedRow.Cells["PartyId"].Value);
//            _dataStorage.adminAtParty = SetAdminPrivileges(_dataStorage.CurrentSelectedPartyId);
            SetSelectedParty();

            Hide();
            var form2 = new SeeParty();

            form2.Closed += (s, args) => Close();
            form2.Show();
        }