public DashboardControl() { InitializeComponent(); productDbutils = new ProductDbUtils(); productCategoryUtils = new ProductCategoryDbUtils(); long product = productDbutils.productCounter(); long category = productCategoryUtils.categoryCounter(); productCount.Content = product.ToString(); categoryCount.Content = category.ToString(); }
public void updateCounter(int connection) { if (connection == 1) { productDbutils = new ProductDbUtils(); productCategoryUtils = new ProductCategoryDbUtils(); long product = productDbutils.productCounter(); long category = productCategoryUtils.categoryCounter(); productCount.Content = product.ToString(); categoryCount.Content = category.ToString(); } }