예제 #1
0
        private void button_DeleteFileFromDb_Click(object sender, EventArgs e)
        {
            FilePersonKeywordClient client = new FilePersonKeywordClient();

            client.DeleteFileByPath(listBox_Files.SelectedItem.ToString());
            label_dbResponse.Text           = "The file is unregistered in DB";
            label_dbResponse.ForeColor      = Color.Red;
            textBox_locations.Text          = "";
            dateTimePicker_createdAt.Value  = DateTime.Now;
            button_AddFileInDb.Enabled      = true;  //Activam butonul de adaugare fisier in DB
            button_DeleteFileFromDb.Enabled = false; //Dezactivam butonul de stergere fisier din DB
            disableArrowButtons();
            client.Close();
            dgk_DB.ClearSelection();
            dgk_file.DataSource = "";
            dgp_DB.ClearSelection();
            dgp_file.DataSource = "";
        }