private void CHM_LISTE_COMMANDE_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Control && e.KeyCode == Keys.F) { panel1.Visible = true; } if (e.KeyCode == Keys.F6) { if (BTN_AJOUTER.Enabled) { BTN_AJOUTER.PerformClick(); } } if (e.KeyCode == Keys.F7) { if (BTN_DETAIL.Enabled) { BTN_DETAIL.PerformClick(); } } if (e.KeyCode == Keys.F8) { if (BTN_Aperçu_cmd.Enabled) { BTN_Aperçu_cmd.PerformClick(); } } if (e.KeyCode == Keys.F5) { chargerListe(); } if (e.KeyCode == Keys.F3) { TB_RECHERCHE.Focus(); TB_RECHERCHE.SelectAll(); } }
private void CHM_LISTE_BONS_LIVRAISON_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F6) { if (BTN_AJOUTER.Enabled) { BTN_AJOUTER.PerformClick(); } } if (e.KeyCode == Keys.F7) { if (BTN_DETAIL.Enabled) { BTN_DETAIL.PerformClick(); } } if (e.KeyCode == Keys.F8) { if (BTN_Aperçu_cmd.Enabled) { BTN_Aperçu_cmd.PerformClick(); } } if (e.KeyCode == Keys.F5) { #region dgv_LISTE_B_LIV.AutoGenerateColumns = false; if (type == "1") { try { Application.DoEvents(); //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_ALL_BON_LIVRAISON(); dt = CLIENT_APP_PARAM.gcws.SELECT_ALL_BON_LIVRAISON(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "2") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Bons de livaison facturés"; //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_B_LIV_FACTURE(); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV_FACTURE(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "3") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Bons de livaison non facturés"; //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_B_LIV_NON_FACTURE(); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV_NON_FACTURE(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "4") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Bons de livaison livrés"; //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_B_LIV_LIVRE(); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV_LIVRE(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "5") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Bons de livaison non livrés"; //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_B_LIV_NON_LIVRE(); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV_NON_LIVRE(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "6") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Liste des Bons de livaison"; //dt = CLIENT_APP_PARAM.GEST.P_BON_LIVRAISON.SELECT_B_LIV_PREPARE(); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV_PREPARE(); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (type == "7") { try { Application.DoEvents(); entete_Formulaire_21.windows_name.Text = "Liste des Bons de livaison"; //dt = CLIENT_APP_PARAM.GEST.P_UTILISATEUR.SELECT_B_LIV(CLIENT_APP_PARAM.Fenetre_principale.code_user); dt = CLIENT_APP_PARAM.gcws.SELECT_B_LIV(CLIENT_APP_PARAM.Fenetre_principale.code_user); bs.DataSource = dt; dgv_LISTE_B_LIV.DataSource = bs; } catch (Exception er) { MessageBox.Show(er.Message, "Connexion serveur", MessageBoxButtons.OK, MessageBoxIcon.Error); } } #endregion } }