public MainForm() { InitializeComponent(); string cnStr = @"Data Source=(local);Initial Catalog=AutoLot;Integrated Security=True;Pooling=False"; _dal = new InventoryDALDC(cnStr); inventoryGrid.DataSource = _dal.GetAllInventory(); }
public MainForm() { InitializeComponent(); string cnString = @"Data Source=(local)\SQLEXPRESS;Initial Catalog=AutoLot; Integrated Security=True;Pooling=False"; //Create our data access object _dal = new InventoryDALDC(cnString); //Fill up our grid inventoryGrid.DataSource = _dal.GetAllInventory(); }
public MainForm() { InitializeComponent(); string cnStr = @"Data Source=CODY-PC\NUCODE;Initial Catalog=AutoLot;Integrated Security=True;Pooling=False"; //Create our data access object _dal = new InventoryDALDC(cnStr); //fill up our grid! inventoryGrid.DataSource = _dal.GetAllInventory(); }
public MainForm() { InitializeComponent(); string cnStr = @"Data Source=.\SQLEXPRESS;Initial Catalog=AutoLot;" + "Integrated Security=True;Pooling=False"; //Create data access object by instantiating InventoryDALDC type with passing in connection information. _dal = new InventoryDALDC(cnStr); // Fill up our grid by Inventory DataTable records. inventoryGrid.DataSource = _dal.GetAllInventory(); }
public DisconnectedGUIMainForm() { InitializeComponent(); // register button event handler buttonUpdateInventory.Click += ButtonUpdateInventory_Click; // this is just for fun ... // buttonUpdateInventory.MouseHover += ButtonMouseOver; string connectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AutoLot;" + "Integrated Security=True;Pooling=False"; // Create our data access object. inventoryDAL = new InventoryDALDC(connectionString); // Fill up our grid! inventoryTable = inventoryDAL.GetAllInventory(); inventoryGrid.DataSource = inventoryTable; }