Example #1
0
 private void Delete()
 {
     if (comboBoxDownload.SelectedValue.ToString() == events)
     {
         EventServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == eventsTypes)
     {
         EventTypeServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == footbollers)
     {
         FootballerServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == footbollersTeams)
     {
         FootballerTeamServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == positions)
     {
         PositionServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == teams)
     {
         TeamServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == teamsTypes)
     {
         TeamTypeServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
     if (comboBoxDownload.SelectedValue.ToString() == trainers)
     {
         TrainerServices.Delete(Convert.ToInt32(comboBoxDeleteByID.SelectedValue));
         DownloadDelete();
     }
 }