static void Main(string[] args) { //适配器模式 Target target = new Adpter(); target.Request(); Player paly = new Forwards("乔丹"); paly.Addach(); paly = new Translation("姚明"); paly.Addach(); paly.Defense(); Console.Read(); }
public DataSet LeeDatos(string Selec) { DataSet dts = new DataSet(); Coneccion.ConnectionString = CadenaConn.ConnectionString; Command.Connection = Coneccion; Command.CommandText = Selec; Adpter.SelectCommand = Command; try { Adpter.Fill(dts); } catch (Exception e) { throw new Exception(Selec + e.Message); } return(dts); }