예제 #1
0
        private void button11_Click(object sender, EventArgs e)
        {
            List <Product> data;
            ReportManager  report = new ReportManager();

            data = this.database.SelectAllProduct();

            DataTable subtotals = report.reportInventoryCostItem(data);

            Export export = new Export();

            export.ExportToCSV(subtotals, "InventoryProductGrid.csv");

            CSVCreatedDialog csvOK = new CSVCreatedDialog();

            csvOK.Show();
        }
예제 #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            List<Product> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllProduct();

            DataTable subtotals = report.reportInventoryCostItem(data);

            Export export = new Export();
            export.ExportToCSV(subtotals, "InventoryProductGrid.csv");

            CSVCreatedDialog csvOK = new CSVCreatedDialog();
            csvOK.Show();
        }
예제 #3
0
        //Report TABS ==> load data on tab change
        private void ReportTabs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ReportTabs.SelectedTab == SalesProduct)
            {
                List <Transactions> data;
                ReportManager       report = new ReportManager();
                data = this.database.SelectAllTransactions();

                DataTable subtotals = report.reportSalesByItem(data);

                SalesProductGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == InventoryProduct)
            {
                List <Product> data;
                ReportManager  report = new ReportManager();
                data = this.database.SelectAllProduct();

                DataTable subtotals = report.reportInventoryCostItem(data);

                InventoryProductGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == SalesMachine)
            {
                List <Transactions> data;
                ReportManager       report = new ReportManager();
                data = this.database.SelectAllTransactions();

                DataTable subtotals = report.reportSalesByMachine(data);

                SalesMachineGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == ReportsMachineProduct)
            {
                List <Transactions> data;
                List <Machine>      machineList;
                ReportManager       report = new ReportManager();
                data        = this.database.SelectAllTransactions();
                machineList = this.database.SelectAllMachine();
                DataTable subtotals = report.reportSalesByProductPerMachine(data, machineList);
                SalesMachineProductGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;
                SalesMachineProductGrid.DataSource      = subtotals;
            }
            else if (ReportTabs.SelectedTab == SalesCityMachine)
            {
                List <Transactions> data;
                List <Machine>      machineList;
                List <City>         cityList;
                ReportManager       report = new ReportManager();
                data        = this.database.SelectAllTransactions();
                machineList = this.database.SelectAllMachine();
                cityList    = this.database.SelectAllCity();
                DataTable subtotals = report.reportSalesByCity(data, machineList, cityList);

                SalesCityMachineGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == RestockMachine)
            {
                List <Machine> machineList;
                ReportManager  report = new ReportManager();
                machineList = this.database.SelectAllMachine();
                DataTable subtotals = report.reportRestockByMachine(machineList);

                RestockMachineGrid.DataSource = subtotals;
            }
        }
예제 #4
0
        //Report TABS ==> load data on tab change
        private void ReportTabs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ReportTabs.SelectedTab == SalesProduct)
            {
                List<Transactions> data;
                ReportManager report = new ReportManager();
                data = this.database.SelectAllTransactions();

                DataTable subtotals = report.reportSalesByItem(data);

                SalesProductGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == InventoryProduct)
            {
                List<Product> data;
                ReportManager report = new ReportManager();
                data = this.database.SelectAllProduct();

                DataTable subtotals = report.reportInventoryCostItem(data);

                InventoryProductGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == SalesMachine)
            {
                List<Transactions> data;
                ReportManager report = new ReportManager();
                data = this.database.SelectAllTransactions();

                DataTable subtotals = report.reportSalesByMachine(data);

                SalesMachineGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == ReportsMachineProduct)
            {
                List<Transactions> data;
                List<Machine> machineList;
                ReportManager report = new ReportManager();
                data = this.database.SelectAllTransactions();
                machineList = this.database.SelectAllMachine();
                DataTable subtotals = report.reportSalesByProductPerMachine(data, machineList);
                SalesMachineProductGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;
                SalesMachineProductGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == SalesCityMachine)
            {
                List<Transactions> data;
                List<Machine> machineList;
                List<City> cityList;
                ReportManager report = new ReportManager();
                data = this.database.SelectAllTransactions();
                machineList = this.database.SelectAllMachine();
                cityList = this.database.SelectAllCity();
                DataTable subtotals = report.reportSalesByCity(data, machineList, cityList);

                SalesCityMachineGrid.DataSource = subtotals;
            }
            else if (ReportTabs.SelectedTab == RestockMachine)
            {

                List<Machine> machineList;
                ReportManager report = new ReportManager();
                machineList = this.database.SelectAllMachine();
                DataTable subtotals = report.reportRestockByMachine(machineList);

                RestockMachineGrid.DataSource = subtotals;
            }
        }