Пример #1
0
        private void NouvelleCommande_Load(object sender, EventArgs e)
        {
            this.comboCodeClient.Focus();

            //----------------Informations Societe (BEGIN)------------------------------//
            InfoSociete Societe = new InfoSociete();
            string      titre   = Societe.nom + "\n" + Societe.adresse + "\nTel:" + Societe.tel + " Fax:" + Societe.fax;

            label10.Text = titre;
            MemoryStream ms = new MemoryStream();

            ms.Write(Societe.logo, 0, Societe.logo.Length);
            Image imgPhoto = Image.FromStream(ms);

            picLogo.Image = imgPhoto;
            //----------------Informations Societe (END)------------------------------//

            labelCodeFacture.Text         = facture.GenerateCode();
            comboCodeClient.DataSource    = TB_Client.GetList();
            comboCodeClient.DisplayMember = "Code";
            dateTimePicker2.Value         = dateTimePicker2.Value.AddDays(1);

            comboCodeClient.Text     = client.GenerateCode();
            textNomClient.Text       = "";
            textPrenomClient.Text    = "";
            maskedTextTelClient.Text = "";
            textAdresseClient.Text   = "";
        }
Пример #2
0
 private void comboCodeClient_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TB_Client c = new TB_Client();
         if (c.FindByKey(comboCodeClient.Text))
         {
             textNomClient.Text       = c.Nom;
             textPrenomClient.Text    = c.Prenom;
             maskedTextTelClient.Text = c.NTel;
             textAdresseClient.Text   = c.Adresse;
             this.SelectNextControl(textAdresseClient, true, true, true, true);
             clientExiste = true;
         }
         else
         {
             comboCodeClient.Text     = c.GenerateCode();
             textNomClient.Text       = "";
             textPrenomClient.Text    = "";
             maskedTextTelClient.Text = "";
             textAdresseClient.Text   = "";
             this.SelectNextControl(comboCodeClient, true, true, true, true);
             clientExiste = false;
         }
     }
 }
Пример #3
0
        public InfoClient()
        {
            InitializeComponent();
            Save          = true;
            btnOK.Enabled = true;
            TB_Client client = new TB_Client();

            c1TextBox1.Value = client.GenerateCode();
        }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            TB_Client client = new TB_Client();

            TextNomClient.Value     = "";
            TextPrenomClient.Value  = "";
            TextTelClient.Value     = "";
            TextAdresseClient.Value = "";
            c1Combo1.Text           = client.GenerateCode();
        }