private void ModifButton(Button ctl, Client cli, Label lbl) { //cli = (Client)clients.ElementAt<Client>(indTab); if (cli.Tiers.Logo.Trim().Equals("") || cli.Tiers.Logo == null) { ctl.BackgroundImage = ((System.Drawing.Image)global::GESTION_CAISSE.Properties.Resources.user_m1); } else { String chemin = Application.StartupPath; chemin += TOOLS.Constantes.FILE_SEPARATOR + cli.Tiers.Logo; ctl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject(chemin))); } ctl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; ctl.Text = ""; ctl.TextAlign = System.Drawing.ContentAlignment.BottomCenter; ctl.UseVisualStyleBackColor = true; ctl.Visible = true; //ctl.Size = new System.Drawing.Size(159, 170); ctl.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); ctl.Click += delegate(object sender, EventArgs e) { Form_Caisse_Click f = (Form_Caisse_Click)fParent; f.clientZero = cli; f.InitInfoClient(); this.Close(); }; lbl.Visible = true; lbl.Text = cli.Nom_prenom; }
private void CalculerClick(object sender, EventArgs e) { Form_Caisse_Click f = (Form_Caisse_Click)fParent; //f.remboursement = f.apayer - Convert.ToDouble(textBox1.Text); f.SommeVersee.Text = textBox1.Text; //f.Relicat.Text = Convert.ToString(Convert.ToDouble(textBox1.Text) - Convert.ToDouble(f.SommeP.Text)); this.Close(); }
private void VALIDER(object sender, EventArgs e) { Form_Caisse_Click f = (Form_Caisse_Click)fParent; if (!textBox1.Text.Equals("")) { f.contenu.Quantite = Convert.ToDouble(textBox1.Text); } else { f.contenu.Quantite = 0; } this.Close(); }