private void Login_Load(object sender, EventArgs e) { Ado = new AdoNet(); FillAdmin(); FillCompte(); Ado.DtAdmin = Ado.Ds.Tables[0]; Ado.DtAdmin.TableName = "Admin"; Ado.DtCompte = Ado.Ds.Tables[1]; Ado.DtCompte.TableName = "Compte"; }
private void Admin_Load(object sender, EventArgs e) { Ado = new AdoNet(); FillAgent(); FillCompte(); FillRole(); Ado.DtAgent = Ado.Ds.Tables[0]; Ado.DtAgent.TableName = "Agent"; Ado.DtCompte = Ado.Ds.Tables[1]; Ado.DtCompte.TableName = "Compte"; Ado.DtRole = Ado.Ds.Tables[2]; Ado.DtRole.TableName = "Role"; this.dgvCompte.DataSource = Ado.DtCompte; this.listAgent.DataSource = Ado.DtAgent; this.listAgent.DisplayMember = Ado.DtAgent.Columns[1].ColumnName; // "agent detail" this.listAgent.ValueMember = Ado.DtAgent.Columns[0].ColumnName; //"id" this.listRole.DataSource = Ado.DtRole; this.listRole.DisplayMember = Ado.DtRole.Columns[1].ColumnName; // "role" this.listRole.ValueMember = Ado.DtRole.Columns[0].ColumnName; //"id" this.listAgent.SelectedIndex = -1; this.listRole.SelectedIndex = -1; }