public Business() { DBData = new NorthWindAccess(); updateCustomerInformation(); updateProductsInformation(); updateEmployeesInformation(); updateCategoryInformation(); updateShippersInformation(); updateSupplierInformation(); nameAndIds = getCustomerNamesAndIDs(); employees = getEmployeesInformation(); //pictures = DBData.getPictures(); pictureList = getCategoryPictureList(); DBData.employeeInfChange += new Update(updateEmployeesInformation); DBData.customerInfChange += new Update(updateCustomerInformation); DBData.productInfChange += new Update(updateProductsInformation); DBData.categoryInfChange += new Update(updateCategoryInformation); DBData.ShipperInfChange += new Update(updateShippersInformation); DBData.SupplierInfChange += new Update(updateSupplierInformation); Application.Run(new frmControl(this)); }
protected void Application_Start(Object sender, EventArgs e) { NorthWindAccess n = new NorthWindAccess("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath(".") + "\\Northwind.mdb"); Application["DBAccessor"] = n; Business b = new Business(n); Application["Business"] = b; }
public Business(NorthWindAccess s) { DBData = s; getCustomerInformation(); getProductsInformation(); getEmployeesInformation(); getCategoryInformation(); getShippersInformation(); getSupplierInformation(); DBData.employeeInfChange += new Update(getEmployeesInformation); DBData.customerInfChange += new Update(getCustomerInformation); DBData.productInfChange += new Update(getProductsInformation); DBData.categoryInfChange += new Update(getCategoryInformation); DBData.ShipperInfChange += new Update(getShippersInformation); DBData.SupplierInfChange += new Update(getSupplierInformation); }