Exemplo n.º 1
0
 private static void ListInventory(InventoryDAL dal)
 {
     foreach (NewCar car in dal.GetAllInventoryAsList()) {
         Console.WriteLine("CarId: {0}, Make: {1}, Color: {2}, PetName: {3}", car.CarId, car.Make, car.Color, car.PetName);
     }
     Console.WriteLine();
 }
Exemplo n.º 2
0
 static void ListInventoryAsList(InventoryDAL invDal) {
     Console.WriteLine("************* ListInventoryAsList *********");
     List<NewCar> data = invDal.GetAllInventoryAsList();
     foreach (NewCar c in data) {
         Console.WriteLine("CarID: {0}, Make: {1}, Color: {2}, PetName: {3}",
             c.CarID, c.Make, c.Color, c.PetName);
     }
 }
Exemplo n.º 3
0
 private static void ListInventoryViaList(InventoryDAL invDAL)
 {
     List<NewCar> record = invDAL.GetAllInventoryAsList();
     foreach (NewCar c in record)
     {
         Console.WriteLine("CarID: {0}, Make: {1}, Color: {2}, PetName: {3}",
             c.CarID, c.Make, c.Color, c.PetName);
     }
 }
Exemplo n.º 4
0
    protected void btnFillGrid_Click(object sender, EventArgs e) {
        Trace.Write("AAAAAAAAAAAAA", "Button Clicked");
        InventoryDAL dal = new InventoryDAL();
        dal.OpenConnection(@"Data Source=(local)\SQLEXPRESS;Initial Catalog=AutoLot;Integrated Security=True");
        carsGridView.DataSource = dal.GetAllInventoryAsList();
        carsGridView.DataBind();
        dal.CloseConnection();

    }
Exemplo n.º 5
0
    protected void btnFillData_Click(object sender, EventArgs e)
    {
        Trace.Write("CodeFileTraceInfo!", "Filling the grid!");

        InventoryDAL dal = new InventoryDAL();
        dal.OpenConnection(@"Data Source=(local)\SQLEXPRESS;" +
          "Initial Catalog=AutoLot;Integrated Security=True");
        carsGridView.DataSource = dal.GetAllInventoryAsList();
        carsGridView.DataBind();
        dal.CloseConnection();
    }