Пример #1
0
        private void button_Remove_Click(object sender, EventArgs e)
        {
            if (this.Item.ItemID == -1)
            {
                MessageBox.Show(IOQMessages.saveFileBeforeAttachment);
                return;
            }

            Attachment a = (((Attachment)this.listBox_Attach.SelectedItem));

            DialogResult rs = MessageBox.Show("Are you sure you want to delete the file " + a.Name + " ?",
                                              "Delete File?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);

            if (rs == DialogResult.Yes)
            {
                ScrumQueueLoading dg = new ScrumQueueLoading();
                dg.Show();
                Attachment.DeleteAttachments(a);
                dg.Close();
            }
            else
            {
                return;
            }

            this.LoadAttachement();
        }