示例#1
0
 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();
     }
 }
示例#2
0
        private void CHM_FICHE_COMMANDE_KeyDown(object sender, KeyEventArgs e)
        {
            if (this.REF_CLIENT.Focused && e.KeyCode == Keys.Enter && this.REF_CLIENT.Text != "")
            {
                Application.DoEvents();
                //DataTable dt = CLIENT_APP_PARAM.GEST.P_COMMANDE.RECHERCHE_CLIENT(this.REF_CLIENT.Text);
                DataTable dt = CLIENT_APP_PARAM.gcws.RECHERCHE_CLIENT(this.REF_CLIENT.Text);
                if (dt.Rows.Count != 0)
                {
                    this.CODE_CLIENT    = dt.Rows[0]["CODE_CLIENT"].ToString();
                    this.RS_CLIENT.Text = dt.Rows[0]["RS_CLIENT"].ToString();
                }
                else
                {
                    this.CODE_CLIENT    = "-1";
                    this.RS_CLIENT.Text = "Référence invalide !";
                }
            }
            if (this.REF_CLIENT.Focused && e.KeyCode == Keys.Enter && this.REF_CLIENT.Text.Trim() == "")
            {
                CHM_COMMANDE_CLIENT c_clt = new CHM_COMMANDE_CLIENT();
                c_clt.client_selection_event += new CHM_COMMANDE_CLIENT.client_selection(c_clt_client_selection_event);
                c_clt.ShowDialog();
            }

            if (e.KeyCode == Keys.F5)
            {
                if (entete_Formulaire_21.btn_refresh.Enabled)
                {
                    entete_Formulaire_21.btn_refresh.PerformClick();
                }
            }
            if (e.KeyCode == Keys.F6)
            {
                if (buttonAJOUTER.Enabled)
                {
                    buttonAJOUTER.PerformClick();
                }
            }
            if (e.KeyCode == Keys.Delete)
            {
                if (buttonSUPPRIMER.Enabled)
                {
                    buttonSUPPRIMER.PerformClick();
                }
            }
            if (e.KeyCode == Keys.F10)
            {
                if (buttonENREGISTRER.Enabled)
                {
                    buttonENREGISTRER.PerformClick();
                }
            }
            if (e.KeyCode == Keys.F8)
            {
                if (BTN_Aperçu_cmd.Enabled)
                {
                    BTN_Aperçu_cmd.PerformClick();
                }
            }
            if (e.KeyCode == Keys.F11)
            {
                if (BTN_B_LIV.Enabled)
                {
                    BTN_B_LIV.PerformClick();
                }
            }
            if (e.KeyCode == Keys.Control && e.KeyCode == Keys.L)
            {
                if (btn_liste_commande.Enabled)
                {
                    btn_liste_commande.PerformClick();
                }
            }
        }
示例#3
0
 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
     }
 }