|  | 
 
| I made a simple electronic photo album during the exercise Use C # + Access
 "Complex DataBinding accepts IList or IListSource as data source" when binding data to DDL
 
 Related Source
 // Binding DDltype
 private void BindDateToDll ()
 {
 BLL.addPhoto addPhoto = new frPhoto.BLL.addPhoto ();
 this.ddlType.DataSource = addPhoto.BindToDdlType (). Tables [0] .Columns [1];
 this.ddlType.DisplayMember = "Tname";
 this.ddlType.ValueMember = "Tid";
 Ranch
 
 }
 
 ********************************
 public DataSet BindToDdlType ()
 {
 string str = "select Tid, Tname from Type order by Tid desc";
 return DAL.DataOper.OpBindDs (str);
 }
 ********************************
 public static DataSet OpBindDs (string str)
 {
 DBConn newCon = new DBConn ();
 OleDbConnection conn = newCon.CreateDbCon ();
 try
 {
 OleDbDataAdapter oda = new OleDbDataAdapter (str, conn);
 DataSet ds = new DataSet ();
 oda.Fill (ds);
 return ds;
 }
 catch
 {
 throw;
 }
 }
 
 
 Use a simple three-tier architecture, please give pointers! !!
 | 
 |