OVH Cloud OVH Cloud

Comment savoir que des données ont changées ??

6 réponses
Avatar
Philippe
Bonjour

sur ma form j ai un oledbdataadpater, et des champs de saisi,
j ai un bouton : Appliquer qui est disable, comments savoir que des
champs ont étés modifies a fin de mettre le btn Appliquer a enabled

merci

6 réponses

Avatar
phenix
Pas assez clair comme question:
Le mot form n'est pas clair, la gestion des événements sur un WinForm est
différente d'un WebForm.Dans le 1er cas, l'os rapporte à l'application dont
la fenêtre est active qu'une touche a été enfoncé.Dans le cas d'un WebForm,
l'os rapporte au navigateur qu'une touche a été enfoncé ce qui se traduit par
l'affichage du caractère de la touche, mais le serveur à distance ne le sait
pas il faut alors spécifier au serveur distant comment se comporter soit il
s'agit d'une interruption déclenchée par la première touche enfoncée par un
AutoPostBack par exemple( mais c'est lourd) qui à son tour déclenche le
"Enable" du bouton.Bon admettons qu'il s'agit d'un WinForm:
Le texte change alors on déclenche un évènement TextChanged
private void textBox2_TextChanged(object sender, System.EventArgs e)
{
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(textBox2);
props["Text"].AddValueChanged(textBox2, new
EventHandler(MyValuetextBox2_Changed));
}
Là je déclenche l'apparition du bouton "Valider" :
private void MyValuetextBox2_Changed(object sender, System.EventArgs e)
{
//Là tu peux "autoriser" ton bouton
button3.Visible= true;
}
Le bouton Valider est cliqué: je fais un SQLUpDate et je fais disparaitre le
bouton
private void button3_Click(object sender, System.EventArgs e)
{
SqlUpdate...
button3.Visible= false;
}
C'est un exemple je ne sais pas ce que tu cherches à faire réellement


"Philippe" a écrit :

Bonjour

sur ma form j ai un oledbdataadpater, et des champs de saisi,
j ai un bouton : Appliquer qui est disable, comments savoir que des
champs ont étés modifies a fin de mettre le btn Appliquer a enabled

merci



Avatar
Philippe
Merci

j avais un peu avancé, je cree un event doUpdateDatas, et tous les
evenements textchanged de mes edit pointent dessus, la je gere mes
boutons, mais quand j ouvre ma fiche, meme sans rien faire il passe dans
textchanged et ce a chaque changement d individu, donc il me mets les
boutosn en enable, alors que rien n a été changé sur la fiche

ce que je voudrais, c est que le bouton s allume uniquement si je fais
des modifs dans un champ et non si je change de fiche

merci de ton aide

comme je débutes en C#, je mets ici mon code


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;


namespace PCM_CLUB
{
/// <summary>
/// Description résumée de DataForm1.
/// </summary>
public class FDetail : System.Windows.Forms.Form
{
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private PCM_CLUB.dsAdherents objdsAdherents;
private System.Windows.Forms.Panel panel1;
private DevExpress.XtraEditors.DataNavigator dataNavigator1;
private System.Windows.Forms.ImageList imageListSexe;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblNOM;
private System.Windows.Forms.Label lblPRENOM;
private System.Windows.Forms.TextBox editNOM;
private System.Windows.Forms.TextBox editPRENOM;
private System.Windows.Forms.Panel panel3;
private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1;
private System.Windows.Forms.Label lblSEXE;
private DevExpress.XtraEditors.DateEdit dateEdit1;
private System.Windows.Forms.Label lblDATE_NAISSANCE;
private System.Windows.Forms.Label lblLIEU_NAISSANCE;
private System.Windows.Forms.TextBox editLIEU_NAISSANCE;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.DateEdit dateEditIncription;
private DevExpress.XtraEditors.RadioGroup rgDatePaiement;
private DevExpress.XtraEditors.RadioGroup rgModePaiement;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comboBox1;
private DevExpress.XtraEditors.DateEdit dateEdit2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label labelRetard;
private DevExpress.XtraEditors.DateEdit dateEditProchPaiement;
private System.Windows.Forms.Panel panel5;
private DevExpress.XtraEditors.PictureEdit pictureEdit1;
private DevExpress.XtraEditors.MemoEdit memoEditInfos;
private System.Windows.Forms.TabControl tabControlDetail;
private System.Windows.Forms.TabPage tabPageDivers;
private System.Windows.Forms.TabPage tabPageInfos;
private System.Windows.Forms.TabPage tabPageAdresses;
private DevExpress.XtraEditors.MemoEdit memoEditNotes;
private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
private System.Windows.Forms.Panel panelAdresses;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Panel panelButton;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnCancelAll;
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.Button btnClose;

// Variables applicatives ----------------------------------

FAdresses aFAdresses = new FAdresses();
public FDetail()
{
//
// Requis pour la prise en charge du Concepteur Windows Forms
//
InitializeComponent();

//
// TODO : ajoutez le code du constructeur après l'appel à
InitializeComponent
//
}

/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Code généré par le Concepteur Windows Form
/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne
modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(typeof(FDetail));
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.objdsAdherents = new PCM_CLUB.dsAdherents();
this.panel1 = new System.Windows.Forms.Panel();
this.btnClose = new System.Windows.Forms.Button();
this.panelButton = new System.Windows.Forms.Panel();
this.btnDelete = new System.Windows.Forms.Button();
this.btnAdd = new System.Windows.Forms.Button();
this.btnCancelAll = new System.Windows.Forms.Button();
this.btnUpdate = new System.Windows.Forms.Button();
this.dataNavigator1 = new DevExpress.XtraEditors.DataNavigator();
this.imageListSexe = new System.Windows.Forms.ImageList(this.components);
this.panel2 = new System.Windows.Forms.Panel();
this.lblNOM = new System.Windows.Forms.Label();
this.lblPRENOM = new System.Windows.Forms.Label();
this.editNOM = new System.Windows.Forms.TextBox();
this.editPRENOM = new System.Windows.Forms.TextBox();
this.panel3 = new System.Windows.Forms.Panel();
this.dateEdit1 = new DevExpress.XtraEditors.DateEdit();
this.lblDATE_NAISSANCE = new System.Windows.Forms.Label();
this.lblLIEU_NAISSANCE = new System.Windows.Forms.Label();
this.editLIEU_NAISSANCE = new System.Windows.Forms.TextBox();
this.imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit();
this.lblSEXE = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.labelRetard = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.dateEditProchPaiement = new DevExpress.XtraEditors.DateEdit();
this.dateEdit2 = new DevExpress.XtraEditors.DateEdit();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.dateEditIncription = new DevExpress.XtraEditors.DateEdit();
this.rgDatePaiement = new DevExpress.XtraEditors.RadioGroup();
this.rgModePaiement = new DevExpress.XtraEditors.RadioGroup();
this.panel5 = new System.Windows.Forms.Panel();
this.pictureEdit1 = new DevExpress.XtraEditors.PictureEdit();
this.tabControlDetail = new System.Windows.Forms.TabControl();
this.tabPageDivers = new System.Windows.Forms.TabPage();
this.memoEditNotes = new DevExpress.XtraEditors.MemoEdit();
this.tabPageInfos = new System.Windows.Forms.TabPage();
this.memoEditInfos = new DevExpress.XtraEditors.MemoEdit();
this.tabPageAdresses = new System.Windows.Forms.TabPage();
this.panelAdresses = new System.Windows.Forms.Panel();

((System.ComponentModel.ISupportInitialize)(this.objdsAdherents)).BeginInit();
this.panel1.SuspendLayout();
this.panelButton.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();

((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit1.Properties)).BeginInit();
this.panel4.SuspendLayout();

((System.ComponentModel.ISupportInitialize)(this.dateEditProchPaiement.Properties)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.dateEditIncription.Properties)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.rgDatePaiement.Properties)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.rgModePaiement.Properties)).BeginInit();
this.panel5.SuspendLayout();

((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).BeginInit();
this.tabControlDetail.SuspendLayout();
this.tabPageDivers.SuspendLayout();

((System.ComponentModel.ISupportInitialize)(this.memoEditNotes.Properties)).BeginInit();
this.tabPageInfos.SuspendLayout();

((System.ComponentModel.ISupportInitialize)(this.memoEditInfos.Properties)).BeginInit();
this.tabPageAdresses.SuspendLayout();
this.SuspendLayout();
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking
Mode=1;Data
Source=""D:ProjetsCSharpPCM_CLUBbinDebugDataBasePCM_Club.mdb"";Jet
OLEDB:Engine Type=5;Jet OLEDB:Global Bulk
Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System
database=;Jet OLEDB:SFPúlse;persist security infoúlse;Extended
Properties=;Mode=Share Deny None;Jet OLEDB:Create System
Databaseúlse;Jet OLEDB:Don't Copy Locale on Compactúlse;Jet
OLEDB:Compact Without Replica Repairúlse;User ID­min;Jet
OLEDB:Encrypt Databaseúlse";
//
// oleDbDataAdapter1
//
this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
this.oleDbDataAdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new
System.Data.Common.DataTableMapping("Table", "Adherents", new
System.Data.Common.DataColumnMapping[] {
new
System.Data.Common.DataColumnMapping("CLUB", "CLUB"),
new
System.Data.Common.DataColumnMapping("DATE_DER_PAIEMENT",
"DATE_DER_PAIEMENT"),
new
System.Data.Common.DataColumnMapping("DATE_INSCRIPTION",
"DATE_INSCRIPTION"),
new
System.Data.Common.DataColumnMapping("DATE_NAISSANCE", "DATE_NAISSANCE"),
new
System.Data.Common.DataColumnMapping("DATE_PROCH_PAIEMENT",
"DATE_PROCH_PAIEMENT"),
new
System.Data.Common.DataColumnMapping("ID", "ID"),
new
System.Data.Common.DataColumnMapping("LIEU_NAISSANCE", "LIEU_NAISSANCE"),
new
System.Data.Common.DataColumnMapping("MEDECIN", "MEDECIN"),
new
System.Data.Common.DataColumnMapping("MODE_PAIEMENT", "MODE_PAIEMENT"),
new
System.Data.Common.DataColumnMapping("NOM", "NOM"),
new
System.Data.Common.DataColumnMapping("PRENOM", "PRENOM"),
new
System.Data.Common.DataColumnMapping("SEXE", "SEXE"),
new
System.Data.Common.DataColumnMapping("TYPE_PAIEMENT", "TYPE_PAIEMENT"),
new
System.Data.Common.DataColumnMapping("PHOTO", "PHOTO"),
new
System.Data.Common.DataColumnMapping("INFOS", "INFOS"),
new
System.Data.Common.DataColumnMapping("NOTES", "NOTES")})});
this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
//
// oleDbDeleteCommand1
//
this.oleDbDeleteCommand1.CommandText = @"DELETE FROM Adherents WHERE
(ID = ?) AND (CLUB = ? OR ? IS NULL AND CLUB IS NULL) AND
(DATE_DER_PAIEMENT = ? OR ? IS NULL AND DATE_DER_PAIEMENT IS NULL) AND
(DATE_INSCRIPTION = ? OR ? IS NULL AND DATE_INSCRIPTION IS NULL) AND
(DATE_NAISSANCE = ? OR ? IS NULL AND DATE_NAISSANCE IS NULL) AND
(DATE_PROCH_PAIEMENT = ? OR ? IS NULL AND DATE_PROCH_PAIEMENT IS NULL)
AND (LIEU_NAISSANCE = ? OR ? IS NULL AND LIEU_NAISSANCE IS NULL) AND
(MEDECIN = ? OR ? IS NULL AND MEDECIN IS NULL) AND (MODE_PAIEMENT = ? OR
? IS NULL AND MODE_PAIEMENT IS NULL) AND (NOM = ? OR ? IS NULL AND NOM
IS NULL) AND (PRENOM = ? OR ? IS NULL AND PRENOM IS NULL) AND (SEXE = ?
OR ? IS NULL AND SEXE IS NULL) AND (TYPE_PAIEMENT = ? OR ? IS NULL AND
TYPE_PAIEMENT IS NULL)";
this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_ID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "ID", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_CLUB",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "CLUB", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_CLUB1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "CLUB", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_DER_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_DER_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_DER_PAIEMENT1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_DER_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_INSCRIPTION",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_INSCRIPTION",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_INSCRIPTION1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_INSCRIPTION",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_NAISSANCE",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_NAISSANCE1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_PROCH_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_PROCH_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_PROCH_PAIEMENT1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_PROCH_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_LIEU_NAISSANCE",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "LIEU_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_LIEU_NAISSANCE1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "LIEU_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MEDECIN",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MEDECIN", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MEDECIN1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MEDECIN", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MODE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MODE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MODE_PAIEMENT1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MODE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_NOM",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "NOM", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_NOM1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "NOM", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_PRENOM",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "PRENOM", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_PRENOM1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "PRENOM", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_SEXE",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "SEXE", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_SEXE1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "SEXE", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_TYPE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "TYPE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_TYPE_PAIEMENT1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "TYPE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
//
// oleDbInsertCommand1
//
this.oleDbInsertCommand1.CommandText = "INSERT INTO Adherents(CLUB,
DATE_DER_PAIEMENT, DATE_INSCRIPTION, DATE_NAISSANCE, " +
"DATE_PROCH_PAIEMENT, LIEU_NAISSANCE, MEDECIN, MODE_PAIEMENT, NOM,
PRENOM, SEXE, " +
"TYPE_PAIEMENT, PHOTO, INFOS, NOTES) VALUES (?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, " +
"?, ?, ?)";
this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("CLUB",
System.Data.OleDb.OleDbType.SmallInt, 0, "CLUB"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_DER_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_DER_PAIEMENT"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_INSCRIPTION",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_INSCRIPTION"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_NAISSANCE",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_NAISSANCE"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_PROCH_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_PROCH_PAIEMENT"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("LIEU_NAISSANCE",
System.Data.OleDb.OleDbType.VarWChar, 255, "LIEU_NAISSANCE"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("MEDECIN",
System.Data.OleDb.OleDbType.SmallInt, 0, "MEDECIN"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("MODE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0, "MODE_PAIEMENT"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("NOM",
System.Data.OleDb.OleDbType.VarWChar, 255, "NOM"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("PRENOM",
System.Data.OleDb.OleDbType.VarWChar, 255, "PRENOM"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("SEXE",
System.Data.OleDb.OleDbType.Integer, 0, "SEXE"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("TYPE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0, "TYPE_PAIEMENT"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("PHOTO",
System.Data.OleDb.OleDbType.VarBinary, 0, "PHOTO"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("INFOS",
System.Data.OleDb.OleDbType.VarWChar, 0, "INFOS"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("NOTES",
System.Data.OleDb.OleDbType.VarWChar, 0, "NOTES"));
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT CLUB,
DATE_DER_PAIEMENT, DATE_INSCRIPTION, DATE_NAISSANCE, DATE_PROCH_PAIE" +
"MENT, ID, LIEU_NAISSANCE, MEDECIN, MODE_PAIEMENT, NOM, PRENOM,
SEXE, TYPE_PAIEME" +
"NT, PHOTO, INFOS, NOTES FROM Adherents";
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
//
// oleDbUpdateCommand1
//
this.oleDbUpdateCommand1.CommandText = @"UPDATE Adherents SET CLUB =
?, DATE_DER_PAIEMENT = ?, DATE_INSCRIPTION = ?, DATE_NAISSANCE = ?,
DATE_PROCH_PAIEMENT = ?, LIEU_NAISSANCE = ?, MEDECIN = ?, MODE_PAIEMENT
= ?, NOM = ?, PRENOM = ?, SEXE = ?, TYPE_PAIEMENT = ?, PHOTO = ?, INFOS
= ?, NOTES = ? WHERE (ID = ?) AND (CLUB = ? OR ? IS NULL AND CLUB IS
NULL) AND (DATE_DER_PAIEMENT = ? OR ? IS NULL AND DATE_DER_PAIEMENT IS
NULL) AND (DATE_INSCRIPTION = ? OR ? IS NULL AND DATE_INSCRIPTION IS
NULL) AND (DATE_NAISSANCE = ? OR ? IS NULL AND DATE_NAISSANCE IS NULL)
AND (DATE_PROCH_PAIEMENT = ? OR ? IS NULL AND DATE_PROCH_PAIEMENT IS
NULL) AND (LIEU_NAISSANCE = ? OR ? IS NULL AND LIEU_NAISSANCE IS NULL)
AND (MEDECIN = ? OR ? IS NULL AND MEDECIN IS NULL) AND (MODE_PAIEMENT =
? OR ? IS NULL AND MODE_PAIEMENT IS NULL) AND (NOM = ? OR ? IS NULL AND
NOM IS NULL) AND (PRENOM = ? OR ? IS NULL AND PRENOM IS NULL) AND (SEXE
= ? OR ? IS NULL AND SEXE IS NULL) AND (TYPE_PAIEMENT = ? OR ? IS NULL
AND TYPE_PAIEMENT IS NULL)";
this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("CLUB",
System.Data.OleDb.OleDbType.SmallInt, 0, "CLUB"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_DER_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_DER_PAIEMENT"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_INSCRIPTION",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_INSCRIPTION"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_NAISSANCE",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_NAISSANCE"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("DATE_PROCH_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0, "DATE_PROCH_PAIEMENT"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("LIEU_NAISSANCE",
System.Data.OleDb.OleDbType.VarWChar, 255, "LIEU_NAISSANCE"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("MEDECIN",
System.Data.OleDb.OleDbType.SmallInt, 0, "MEDECIN"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("MODE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0, "MODE_PAIEMENT"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("NOM",
System.Data.OleDb.OleDbType.VarWChar, 255, "NOM"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("PRENOM",
System.Data.OleDb.OleDbType.VarWChar, 255, "PRENOM"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("SEXE",
System.Data.OleDb.OleDbType.Integer, 0, "SEXE"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("TYPE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0, "TYPE_PAIEMENT"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("PHOTO",
System.Data.OleDb.OleDbType.VarBinary, 0, "PHOTO"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("INFOS",
System.Data.OleDb.OleDbType.VarWChar, 0, "INFOS"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("NOTES",
System.Data.OleDb.OleDbType.VarWChar, 0, "NOTES"));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_ID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "ID", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_CLUB",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "CLUB", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_CLUB1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "CLUB", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_DER_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_DER_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_DER_PAIEMENT1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_DER_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_INSCRIPTION",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_INSCRIPTION",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_INSCRIPTION1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_INSCRIPTION",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_NAISSANCE",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_NAISSANCE1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_PROCH_PAIEMENT",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_PROCH_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_DATE_PROCH_PAIEMENT1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "DATE_PROCH_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_LIEU_NAISSANCE",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "LIEU_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_LIEU_NAISSANCE1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "LIEU_NAISSANCE",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MEDECIN",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MEDECIN", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MEDECIN1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MEDECIN", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MODE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MODE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_MODE_PAIEMENT1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "MODE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_NOM",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "NOM", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_NOM1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "NOM", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_PRENOM",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "PRENOM", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_PRENOM1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "PRENOM", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_SEXE",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "SEXE", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_SEXE1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "SEXE", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_TYPE_PAIEMENT",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "TYPE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_TYPE_PAIEMENT1",
System.Data.OleDb.OleDbType.SmallInt, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "TYPE_PAIEMENT",
System.Data.DataRowVersion.Original, null));
//
// objdsAdherents
//
this.objdsAdherents.DataSetName = "dsAdherents";
this.objdsAdherents.Locale = new
System.Globalization.CultureInfo("fr-FR");
//
// panel1
//
this.panel1.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.btnClose);
this.panel1.Controls.Add(this.panelButton);
this.panel1.Controls.Add(this.dataNavigator1);
this.panel1.Location = new System.Drawing.Point(5, 401);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(655, 32);
this.panel1.TabIndex = 24;
//
// btnClose
//
this.btnClose.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnClose.Location = new System.Drawing.Point(258, 4);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(72, 23);
this.btnClose.TabIndex = 43;
this.btnClose.Text = "Fermer";
this.btnClose.Visible = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// panelButton
//
this.panelButton.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.panelButton.Controls.Add(this.btnDelete);
this.panelButton.Controls.Add(this.btnAdd);
this.panelButton.Controls.Add(this.btnCancelAll);
this.panelButton.Controls.Add(this.btnUpdate);
this.panelButton.Location = new System.Drawing.Point(361, 1);
this.panelButton.Name = "panelButton";
this.panelButton.Size = new System.Drawing.Size(288, 26);
this.panelButton.TabIndex = 42;
//
// btnDelete
//
this.btnDelete.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnDelete.Location = new System.Drawing.Point(69, 3);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(72, 23);
this.btnDelete.TabIndex = 48;
this.btnDelete.Text = "&Supprimer";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnAdd
//
this.btnAdd.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnAdd.Location = new System.Drawing.Point(0, 3);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(69, 23);
this.btnAdd.TabIndex = 47;
this.btnAdd.Text = "Aj&outer";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnCancelAll
//
this.btnCancelAll.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.btnCancelAll.Enabled = false;
this.btnCancelAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnCancelAll.Location = new System.Drawing.Point(141, 3);
this.btnCancelAll.Name = "btnCancelAll";
this.btnCancelAll.Size = new System.Drawing.Size(74, 23);
this.btnCancelAll.TabIndex = 46;
this.btnCancelAll.Text = "A&nnuler tout";
this.btnCancelAll.Click += new
System.EventHandler(this.btnCancelAll_Click);
//
// btnUpdate
//
this.btnUpdate.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdate.Enabled = false;
this.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnUpdate.Location = new System.Drawing.Point(215, 3);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(69, 23);
this.btnUpdate.TabIndex = 45;
this.btnUpdate.Text = "&Mettre à jour";
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// dataNavigator1
//
this.dataNavigator1.Buttons.Append.Visible = false;
this.dataNavigator1.Buttons.CancelEdit.Visible = false;
this.dataNavigator1.Buttons.EndEdit.Visible = false;
this.dataNavigator1.Buttons.Remove.Visible = false;
this.dataNavigator1.DataMember = "Adherents";
this.dataNavigator1.DataSource = this.objdsAdherents;
this.dataNavigator1.Location = new System.Drawing.Point(3, 3);
this.dataNavigator1.Name = "dataNavigator1";
this.dataNavigator1.ShowToolTips = true;
this.dataNavigator1.Size = new System.Drawing.Size(209, 23);
this.dataNavigator1.TabIndex = 26;
this.dataNavigator1.Text = "dataNavigator1";
this.dataNavigator1.TextLocation =
DevExpress.XtraEditors.NavigatorButtonsTextLocation.Center;
this.dataNavigator1.Click += new
System.EventHandler(this.dataNavigator1_Click);

//
// imageListSexe
//
this.imageListSexe.ImageSize = new System.Drawing.Size(16, 16);
this.imageListSexe.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListSexe.ImageStream")));
this.imageListSexe.TransparentColor = System.Drawing.Color.Empty;
//
// panel2
//
this.panel2.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.lblNOM);
this.panel2.Controls.Add(this.lblPRENOM);
this.panel2.Controls.Add(this.editNOM);
this.panel2.Controls.Add(this.editPRENOM);
this.panel2.Location = new System.Drawing.Point(5, 8);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(536, 64);
this.panel2.TabIndex = 29;
//
// lblNOM
//
this.lblNOM.Location = new System.Drawing.Point(12, 10);
this.lblNOM.Name = "lblNOM";
this.lblNOM.Size = new System.Drawing.Size(40, 13);
this.lblNOM.TabIndex = 14;
this.lblNOM.Text = "Nom";
//
// lblPRENOM
//
this.lblPRENOM.Location = new System.Drawing.Point(12, 37);
this.lblPRENOM.Name = "lblPRENOM";
this.lblPRENOM.Size = new System.Drawing.Size(64, 19);
this.lblPRENOM.TabIndex = 15;
this.lblPRENOM.Text = "Prénom";
//
// editNOM
//
this.editNOM.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.editNOM.DataBindings.Add(new
System.Windows.Forms.Binding("Text", this.objdsAdherents, "Adherents.NOM"));
this.editNOM.Font = new System.Drawing.Font("Microsoft Sans Serif",
8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.editNOM.Location = new System.Drawing.Point(123, 7);
this.editNOM.Name = "editNOM";
this.editNOM.Size = new System.Drawing.Size(397, 20);
this.editNOM.TabIndex = 16;
this.editNOM.Text = "";
this.editNOM.TextChanged += new System.EventHandler(this.doUpdateDatas);
//
// editPRENOM
//
this.editPRENOM.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.editPRENOM.DataBindings.Add(new
System.Windows.Forms.Binding("Text", this.objdsAdherents,
"Adherents.PRENOM"));
this.editPRENOM.Location = new System.Drawing.Point(123, 35);
this.editPRENOM.Name = "editPRENOM";
this.editPRENOM.Size = new System.Drawing.Size(397, 20);
this.editPRENOM.TabIndex = 17;
this.editPRENOM.Text = "";
this.editPRENOM.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// panel3
//
this.panel3.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BackColor = System.Drawing.SystemColors.Control;
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.dateEdit1);
this.panel3.Controls.Add(this.lblDATE_NAISSANCE);
this.panel3.Controls.Add(this.lblLIEU_NAISSANCE);
this.panel3.Controls.Add(this.editLIEU_NAISSANCE);
this.panel3.Controls.Add(this.imageComboBoxEdit1);
this.panel3.Controls.Add(this.lblSEXE);
this.panel3.Location = new System.Drawing.Point(5, 76);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(536, 60);
this.panel3.TabIndex = 30;
//
// dateEdit1
//
this.dateEdit1.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.DATE_NAISSANCE"));
this.dateEdit1.EditValue = new System.DateTime(2005, 1, 29, 0, 0, 0, 0);
this.dateEdit1.Location = new System.Drawing.Point(283, 7);
this.dateEdit1.Name = "dateEdit1";
//
// dateEdit1.Properties
//
this.dateEdit1.Properties.Buttons.AddRange(new
DevExpress.XtraEditors.Controls.EditorButton[] {
new
DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.DisplayFormat.FormatString = "dd/MM/yyyy";
this.dateEdit1.Properties.DisplayFormat.FormatType =
DevExpress.Utils.FormatType.DateTime;
this.dateEdit1.Properties.Style = new
DevExpress.Utils.ViewStyle("ControlStyle", null, new
System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0))), "", DevExpress.Utils.StyleOptions.StyleEnabled,
true, false, false, DevExpress.Utils.HorzAlignment.Center,
DevExpress.Utils.VertAlignment.Center, null,
System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText);
this.dateEdit1.Size = new System.Drawing.Size(85, 20);
this.dateEdit1.TabIndex = 34;
this.dateEdit1.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// lblDATE_NAISSANCE
//
this.lblDATE_NAISSANCE.Location = new System.Drawing.Point(226, 9);
this.lblDATE_NAISSANCE.Name = "lblDATE_NAISSANCE";
this.lblDATE_NAISSANCE.Size = new System.Drawing.Size(48, 16);
this.lblDATE_NAISSANCE.TabIndex = 31;
this.lblDATE_NAISSANCE.Text = "Né(e) le";
//
// lblLIEU_NAISSANCE
//
this.lblLIEU_NAISSANCE.Location = new System.Drawing.Point(12, 37);
this.lblLIEU_NAISSANCE.Name = "lblLIEU_NAISSANCE";
this.lblLIEU_NAISSANCE.Size = new System.Drawing.Size(100, 16);
this.lblLIEU_NAISSANCE.TabIndex = 32;
this.lblLIEU_NAISSANCE.Text = "Lieu de naissance";
//
// editLIEU_NAISSANCE
//
this.editLIEU_NAISSANCE.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.editLIEU_NAISSANCE.DataBindings.Add(new
System.Windows.Forms.Binding("Text", this.objdsAdherents,
"Adherents.LIEU_NAISSANCE"));
this.editLIEU_NAISSANCE.Location = new System.Drawing.Point(123, 34);
this.editLIEU_NAISSANCE.Name = "editLIEU_NAISSANCE";
this.editLIEU_NAISSANCE.Size = new System.Drawing.Size(397, 20);
this.editLIEU_NAISSANCE.TabIndex = 33;
this.editLIEU_NAISSANCE.Text = "";
this.editLIEU_NAISSANCE.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// imageComboBoxEdit1
//
this.imageComboBoxEdit1.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.SEXE"));
this.imageComboBoxEdit1.EditValue = "imageComboBoxEdit1";
this.imageComboBoxEdit1.Location = new System.Drawing.Point(123, 7);
this.imageComboBoxEdit1.Name = "imageComboBoxEdit1";
//
// imageComboBoxEdit1.Properties
//
this.imageComboBoxEdit1.Properties.Buttons.AddRange(new
DevExpress.XtraEditors.Controls.EditorButton[] {
new
DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.imageComboBoxEdit1.Properties.Items.AddRange(new object[] {
new
DevExpress.XtraEditors.Controls.ImageComboBoxItem("Homme", 1, 1),
new
DevExpress.XtraEditors.Controls.ImageComboBoxItem("Femme", 2, 0)});
this.imageComboBoxEdit1.Properties.SmallImages = this.imageListSexe;
this.imageComboBoxEdit1.Size = new System.Drawing.Size(88, 20);
this.imageComboBoxEdit1.TabIndex = 30;
this.imageComboBoxEdit1.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// lblSEXE
//
this.lblSEXE.Location = new System.Drawing.Point(12, 9);
this.lblSEXE.Name = "lblSEXE";
this.lblSEXE.Size = new System.Drawing.Size(40, 16);
this.lblSEXE.TabIndex = 29;
this.lblSEXE.Text = "Sexe";
//
// panel4
//
this.panel4.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel4.BackColor = System.Drawing.SystemColors.Control;
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.labelRetard);
this.panel4.Controls.Add(this.label6);
this.panel4.Controls.Add(this.label5);
this.panel4.Controls.Add(this.label4);
this.panel4.Controls.Add(this.dateEditProchPaiement);
this.panel4.Controls.Add(this.dateEdit2);
this.panel4.Controls.Add(this.comboBox1);
this.panel4.Controls.Add(this.label3);
this.panel4.Controls.Add(this.label2);
this.panel4.Controls.Add(this.label1);
this.panel4.Controls.Add(this.dateEditIncription);
this.panel4.Controls.Add(this.rgDatePaiement);
this.panel4.Controls.Add(this.rgModePaiement);
this.panel4.Location = new System.Drawing.Point(5, 141);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(655, 103);
this.panel4.TabIndex = 37;
//
// labelRetard
//
this.labelRetard.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.labelRetard.Font = new System.Drawing.Font("Microsoft Sans
Serif", 8.25F, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.labelRetard.ForeColor = System.Drawing.Color.Red;
this.labelRetard.Location = new System.Drawing.Point(480, 81);
this.labelRetard.Name = "labelRetard";
this.labelRetard.Size = new System.Drawing.Size(104, 16);
this.labelRetard.TabIndex = 49;
this.labelRetard.Text = "Paiement en retard";
//
// label6
//
this.label6.Location = new System.Drawing.Point(15, 55);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(100, 16);
this.label6.TabIndex = 48;
this.label6.Text = "Le Club";
//
// label5
//
this.label5.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.label5.Location = new System.Drawing.Point(448, 57);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(102, 16);
this.label5.TabIndex = 47;
this.label5.Text = "Prochain paiement";
//
// label4
//
this.label4.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.label4.Location = new System.Drawing.Point(449, 26);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(93, 16);
this.label4.TabIndex = 46;
this.label4.Text = "Dernier paiement";
//
// dateEditProchPaiement
//
this.dateEditProchPaiement.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.dateEditProchPaiement.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.DATE_PROCH_PAIEMENT"));
this.dateEditProchPaiement.EditValue = new System.DateTime(2005, 1,
29, 0, 0, 0, 0);
this.dateEditProchPaiement.Location = new System.Drawing.Point(557, 53);
this.dateEditProchPaiement.Name = "dateEditProchPaiement";
//
// dateEditProchPaiement.Properties
//
this.dateEditProchPaiement.Properties.Buttons.AddRange(new
DevExpress.XtraEditors.Controls.EditorButton[] {
new
DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEditProchPaiement.Properties.DisplayFormat.FormatString =
"dd/MM/yyyy";
this.dateEditProchPaiement.Properties.DisplayFormat.FormatType =
DevExpress.Utils.FormatType.DateTime;
this.dateEditProchPaiement.Properties.Style = new
DevExpress.Utils.ViewStyle("ControlStyle", null, new
System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0))), "", DevExpress.Utils.StyleOptions.StyleEnabled,
true, false, false, DevExpress.Utils.HorzAlignment.Center,
DevExpress.Utils.VertAlignment.Center, null,
System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText);
this.dateEditProchPaiement.Size = new System.Drawing.Size(81, 20);
this.dateEditProchPaiement.TabIndex = 45;
this.dateEditProchPaiement.EditValueChanged += new
System.EventHandler(this.dateEditProchPaiement_EditValueChanged);
this.dateEditProchPaiement.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// dateEdit2
//
this.dateEdit2.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.dateEdit2.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.DATE_DER_PAIEMENT"));
this.dateEdit2.EditValue = new System.DateTime(2005, 1, 29, 0, 0, 0, 0);
this.dateEdit2.Location = new System.Drawing.Point(557, 25);
this.dateEdit2.Name = "dateEdit2";
//
// dateEdit2.Properties
//
this.dateEdit2.Properties.Buttons.AddRange(new
DevExpress.XtraEditors.Controls.EditorButton[] {
new
DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit2.Properties.DisplayFormat.FormatString = "dd/MM/yyyy";
this.dateEdit2.Properties.DisplayFormat.FormatType =
DevExpress.Utils.FormatType.DateTime;
this.dateEdit2.Properties.Style = new
DevExpress.Utils.ViewStyle("ControlStyle", null, new
System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0))), "", DevExpress.Utils.StyleOptions.StyleEnabled,
true, false, false, DevExpress.Utils.HorzAlignment.Center,
DevExpress.Utils.VertAlignment.Center, null,
System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText);
this.dateEdit2.Size = new System.Drawing.Size(81, 20);
this.dateEdit2.TabIndex = 44;
this.dateEdit2.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// comboBox1
//
this.comboBox1.DataSource = this.objdsAdherents;
this.comboBox1.DisplayMember = "Adherents.CLUB";
this.comboBox1.Location = new System.Drawing.Point(15, 73);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(115, 21);
this.comboBox1.TabIndex = 43;
this.comboBox1.ValueMember = "Adherents.CLUB";
this.comboBox1.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// label3
//
this.label3.Location = new System.Drawing.Point(246, 5);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 16);
this.label3.TabIndex = 42;
this.label3.Text = "Délais";
//
// label2
//
this.label2.Location = new System.Drawing.Point(141, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 16);
this.label2.TabIndex = 41;
this.label2.Text = "Paiement";
//
// label1
//
this.label1.Location = new System.Drawing.Point(15, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 16);
this.label1.TabIndex = 40;
this.label1.Text = "Date d'inscription";
//
// dateEditIncription
//
this.dateEditIncription.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.DATE_INSCRIPTION"));
this.dateEditIncription.EditValue = new System.DateTime(((long)(0)));
this.dateEditIncription.Location = new System.Drawing.Point(15, 24);
this.dateEditIncription.Name = "dateEditIncription";
//
// dateEditIncription.Properties
//
this.dateEditIncription.Properties.Buttons.AddRange(new
DevExpress.XtraEditors.Controls.EditorButton[] {
new
DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEditIncription.Properties.DisplayFormat.FormatString =
"dd/mm/yyyy";
this.dateEditIncription.Properties.DisplayFormat.FormatType =
DevExpress.Utils.FormatType.DateTime;
this.dateEditIncription.Properties.Style = new
DevExpress.Utils.ViewStyle("ControlStyle", null, new
System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0))), "", DevExpress.Utils.StyleOptions.StyleEnabled,
true, false, false, DevExpress.Utils.HorzAlignment.Center,
DevExpress.Utils.VertAlignment.Center, null,
System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText);
this.dateEditIncription.Size = new System.Drawing.Size(112, 20);
this.dateEditIncription.TabIndex = 39;
this.dateEditIncription.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// rgDatePaiement
//
this.rgDatePaiement.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.TYPE_PAIEMENT"));
this.rgDatePaiement.EditValue = 1;
this.rgDatePaiement.Location = new System.Drawing.Point(247, 24);
this.rgDatePaiement.Name = "rgDatePaiement";
//
// rgDatePaiement.Properties
//
this.rgDatePaiement.Properties.DisplayFormat.FormatType =
DevExpress.Utils.FormatType.Numeric;
this.rgDatePaiement.Properties.EditFormat.FormatType =
DevExpress.Utils.FormatType.Numeric;
this.rgDatePaiement.Properties.Items.AddRange(new
DevExpress.XtraEditors.Controls.RadioGroupItem[] {
new
DevExpress.XtraEditors.Controls.RadioGroupItem(0, "Mois"),
new
DevExpress.XtraEditors.Controls.RadioGroupItem(1, "Trimestre"),
new
DevExpress.XtraEditors.Controls.RadioGroupItem(2, "Année")});
this.rgDatePaiement.Properties.LookAndFeel.Style =
DevExpress.LookAndFeel.LookAndFeelStyle.Office2003;
this.rgDatePaiement.Size = new System.Drawing.Size(96, 73);
this.rgDatePaiement.TabIndex = 38;
this.rgDatePaiement.TextChanged += new
System.EventHandler(this.doUpdateDatas);
//
// rgModePaiement
//
this.rgModePaiement.DataBindings.Add(new
System.Windows.Forms.Binding("EditValue", this.objdsAdherents,
"Adherents.MODE_PAIEMENT"));
this.rgModePaiement.EditValue = 0;
this.rgModePaiement.Location = new System.Drawing.Point(142, 24);
this.rgModePaiement.Name = "rgModePaiement";
//
// rgModePaiement.Properties
//
this.rgModePaiement.Properties.Items.AddRange(new
DevExpress.XtraEditors.Controls.RadioGroupItem[] {
new
DevExpress.XtraEditors.Controls.RadioGroupItem(0, "Chèque"),
new
DevExpress.XtraEditors.Controls.Radio
Avatar
phenix
Sympa ton appli.Apparement,l'apparition de ta fiche provoque l'évènement
textBox_TextChanged ce qui parait A priori normal si tu redescends des
données depuis ton dataset , je dis bien "A priori"mais ça reste à vérifier.
Raison de plus pour filtrer cet évènement par "puisque le texte a changé,
l'est-il par une frappe du clavier? Si oui alors on valide le bouton si non
on le laisse tel quel.Une petite séance de test s'impose... A+ (quand j'aurai
testé le code).
Avatar
Philippe
merci

comment faire le si c est une frappe du clavier, j ai bien trouvé pour
le mettre sur la fenetre, mais dans ce cas ca le fait aussi si je fais enter

en fait c est je penses, la dedans qu il devrait y avoir le test de
frappe clavier

private void doUpdateDatas(object sender, System.EventArgs e)

{

PropertyDescriptorCollection props =
TypeDescriptor.GetProperties(sender);
props["Text"].AddValueChanged(sender, new EventHandler(doButon_Changed));
}

merci de ton aide
ici j ai mis toute l appli (elle n est pas grosse, c est mes debut en c#)

http://p.cazaux.moutou.free.fr/test/PCM_CLUB.rar



phenix a écrit :
Sympa ton appli.Apparement,l'apparition de ta fiche provoque l'évènement
textBox_TextChanged ce qui parait A priori normal si tu redescends des
données depuis ton dataset , je dis bien "A priori"mais ça reste à vérifier.
Raison de plus pour filtrer cet évènement par "puisque le texte a changé,
l'est-il par une frappe du clavier? Si oui alors on valide le bouton si non
on le laisse tel quel.Une petite séance de test s'impose... A+ (quand j'aurai
testé le code).




Avatar
phenix
Eh oui c'est pas simple, c'est du genre
private bool Key_Press
//là je teste l'évènement KeyPress dans la textBox Nom
// mais je peux le réitérer sur chaque textBox
private void editNOM_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
Key_Press= true;
}
Puis dans ton doUpdateDatas:
if Key_Press
BtnValide.Enabled = true
et en testant:
Le copier-coller le déclenche ou une frappe clavier sinon Enter ne le
declenche pas.Elle est pas belle la vie!?

"Philippe" wrote:

merci

comment faire le si c est une frappe du clavier, j ai bien trouvé pour
le mettre sur la fenetre, mais dans ce cas ca le fait aussi si je fais enter

en fait c est je penses, la dedans qu il devrait y avoir le test de
frappe clavier

private void doUpdateDatas(object sender, System.EventArgs e)

{

PropertyDescriptorCollection props =
TypeDescriptor.GetProperties(sender);
props["Text"].AddValueChanged(sender, new EventHandler(doButon_Changed));
}

merci de ton aide
ici j ai mis toute l appli (elle n est pas grosse, c est mes debut en c#)

http://p.cazaux.moutou.free.fr/test/PCM_CLUB.rar



phenix a écrit :
> Sympa ton appli.Apparement,l'apparition de ta fiche provoque l'évènement
> textBox_TextChanged ce qui parait A priori normal si tu redescends des
> données depuis ton dataset , je dis bien "A priori"mais ça reste à vérifier.
> Raison de plus pour filtrer cet évènement par "puisque le texte a changé,
> l'est-il par une frappe du clavier? Si oui alors on valide le bouton si non
> on le laisse tel quel.Une petite séance de test s'impose... A+ (quand j'aurai
> testé le code).
>
>



Avatar
phenix
"phenix" wrote:

Eh oui c'est pas simple, c'est du genre
private bool Key_Press
//là je teste l'évènement KeyPress dans la textBox Nom
// mais je peux le réitérer sur chaque textBox
private void editNOM_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
Key_Press= true;
}
Puis dans ton doUpdateDatas:
if Key_Press
BtnValide.Enabled = true
et en testant:
Une frappe clavier le déclenche, le copier-coller ne le >déclenche pas et Enter non plus.
Elle est pas belle la vie!?

"Philippe" wrote:

> merci
>
> comment faire le si c est une frappe du clavier, j ai bien trouvé pour
> le mettre sur la fenetre, mais dans ce cas ca le fait aussi si je fais enter
>
> en fait c est je penses, la dedans qu il devrait y avoir le test de
> frappe clavier
>
> private void doUpdateDatas(object sender, System.EventArgs e)
>
> {
>
> PropertyDescriptorCollection props =
> TypeDescriptor.GetProperties(sender);
> props["Text"].AddValueChanged(sender, new EventHandler(doButon_Changed));
> }
>
> merci de ton aide
> ici j ai mis toute l appli (elle n est pas grosse, c est mes debut en c#)
>
> http://p.cazaux.moutou.free.fr/test/PCM_CLUB.rar
>
>
>
> phenix a écrit :
> > Sympa ton appli.Apparement,l'apparition de ta fiche provoque l'évènement
> > textBox_TextChanged ce qui parait A priori normal si tu redescends des
> > données depuis ton dataset , je dis bien "A priori"mais ça reste à vérifier.
> > Raison de plus pour filtrer cet évènement par "puisque le texte a changé,
> > l'est-il par une frappe du clavier? Si oui alors on valide le bouton si non
> > on le laisse tel quel.Une petite séance de test s'impose... A+ (quand j'aurai
> > testé le code).
> >
> >
>