Пример #1
0
        private void buttonRemoveImage_Click(object sender, EventArgs e)
        {
            if (this.FileActive != null)
            {
                DbService.RemoveFileById(this.FileActive.FileId);
                MessageBox.Show(this.FileActive.Name, "File removed from directory listing.");

                this.FileActive = null;
                DisplayService_BindList();
                DisplayService_BindPanel();
            }
        }
Пример #2
0
        private void buttonRemove_Click(object sender, EventArgs e)
        {
            const string message = "Are you sure that you would like to remove this file?";
            const string caption = "File Removal";
            var result = MessageBox.Show(message, caption,
                                         MessageBoxButtons.YesNo,
                                         MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                DbService.RemoveFileById(this.FileId);
                this.Changes = true;
                this.Dashboard.FileActive = null;
                this.Close();


            }
        }