Exemple #1
0
        private void returnButton_Click(object sender, EventArgs e)
        {
            try
            {
                if ((int)returnComboBox.SelectedValue != null)
                {
                    int affectedRows = mediaLogic.DeleteBorrow((int)returnComboBox.SelectedValue);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Nothing to return");
            }

            returnComboBox.DataSource    = mediaLogic.ListReturn(CurrentUser.UserID);
            returnComboBox.DisplayMember = "PairName";
            returnComboBox.ValueMember   = "PairId";
            returnComboBox.Text          = "";
        }