private void update_data_DoWork_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { progresbar.Hide(); equipement_model model = ((equipement_model)e.Result); add_success add_Success = new add_success(model); add_Success.ShowDialog(); }
private void working_back_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { progresbar.Hide(); List <object> parameters = e.Result as List <object>; int i = int.Parse(parameters[0].ToString()); equipement_model item = (equipement_model)parameters[1]; if (i == -1) { MessageBox.Show("errure d'ajouter"); } else { add_success add_Success = new add_success(item); add_Success.ShowDialog(); } }
private void back_forniseur__add_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { progresbar.Hide(); List <object> parameters = e.Result as List <object>; int i = int.Parse(parameters[0].ToString()); fourniseur_model item = (fourniseur_model)parameters[1]; if (i == -1) { MessageBox.Show("errure d'ajouter"); } else { units.Controls_clear(ajoute); add_success add_Success = new add_success(item); add_Success.ShowDialog(); } }
/* * when the ayscn task of adding data complete */ private void add_data_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { List <object> args = e.Result as List <object>; int RUN_CODE = (int)args[0]; article_model data = (article_model)args[1]; progresbar.Hide(); if (RUN_CODE == -1) { MessageBox.Show("Error en Entree"); } else { add_success dialog = new add_success(data); dialog.ShowDialog(); } _units.Controls_clear(bon_entre); }