private void button1_Click(object sender, EventArgs e) { GeneralSales GeneralSales = new GeneralSales(); switch (ComboBoxGeneralSalesDemandSorter.SelectedItem.ToString()) { case "Ascending": DataGridViewgeneralSales.DataSource = GeneralSales.GetItemDemand("Ascending"); break; case "Descending": DataGridViewgeneralSales.DataSource = GeneralSales.GetItemDemand("Descending"); break; } }
private void ButtonGeneralSalesShow1_Click(object sender, EventArgs e) { GeneralSales GeneralSales = new GeneralSales(); if (GeneralSales.BasicStatistics(GeneralSales.GetStartDate(ComboBoxGeneralSalesPeriod.SelectedItem.ToString()), GeneralSales.GetEndDate()) == true) { //LabelTotalSalesValue.Text = GeneralSales.GetTotalSales().ToString(); ///////// LabelTotalOrdersValue.Text = GeneralSales.GetTotalOrders().ToString(); LabelTotalUnitsSoldValue.Text = GeneralSales.GetTotalUnitsSold().ToString(); } else { //Error handling not required. } }