コード例 #1
0
 //CITY TABS ==> load data on tab change
 private void CityTabs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CityTabs.SelectedTab == CityList)
     {
         this.LoadCityMachinesDataGrid();
     }
     else if (CityTabs.SelectedTab == RevenueByCity)
     {
         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.reportRevenueByCity(data, machineList, cityList);
         CityTotalRevenueDataGrid.DataSource = subtotals;
     }
     else if (CityTabs.SelectedTab == ItemSalesByCity)
     {
         List <Transactions> data;
         List <City>         cities;
         List <Machine>      machines;
         ReportManager       report = new ReportManager();
         data     = this.database.SelectAllTransactions();
         cities   = this.database.SelectAllCity();
         machines = this.database.SelectAllMachine();
         DataTable source = report.reportSalesByCityAndItem(data, cities, machines);
         CitySalesByItemDataGrid.DataSource = source;
     }
 }
コード例 #2
0
        private void StartUp_Load(object sender, EventArgs e)
        {
            List <Product> data;
            ReportManager  report = new ReportManager();

            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);

            ProductWarehouseDataGrid.DataSource = source;

            this.LoadCityMachinesDataGrid();

            List <Machine> data2;

            data2 = this.database.SelectAllMachine();
            MachineListAllDataGrid.DataSource = data2;

            List <Transactions> data3;
            ReportManager       report2 = new ReportManager();

            data3 = this.database.SelectAllTransactions();
            DataTable subtotals = report2.reportSalesByItem(data3);

            SalesProductGrid.DataSource = subtotals;

            treeView1.ExpandAll();
            treeView2.ExpandAll();
        }
コード例 #3
0
        public void LoadWarehouseTransferGridView()
        {
            WarehouseTransferGridView.DataSource = null;
            WarehouseTransferGridView.Update();
            WarehouseTransferGridView.Refresh();

            List<Product> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);
            WarehouseTransferGridView.DataSource = source;
        }
コード例 #4
0
        public void LoadMachineTransferGridView()
        {
            MachineTransferGridView.DataSource = null;
            MachineTransferGridView.Update();
            MachineTransferGridView.Refresh();

            List<Machine> data = new List<Machine>();
            data.Add(machine);
            ReportManager report = new ReportManager();
            DataTable source = report.reportProductPriceByMachine(data);
            MachineTransferGridView.DataSource = source;
        }
コード例 #5
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        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();
        }
コード例 #6
0
        //
        // Load/Refresh Full Datagrid views
        //
        public void LoadProductWarehouseDataGrid()
        {
            ProductWarehouseDataGrid.DataSource = null;
            ProductWarehouseDataGrid.Update();
            ProductWarehouseDataGrid.Refresh();

            List <Product> data;
            ReportManager  report = new ReportManager();

            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);

            ProductWarehouseDataGrid.DataSource = source;
        }
コード例 #7
0
        public void LoadWarehouseTransferGridView()
        {
            WarehouseTransferGridView.DataSource = null;
            WarehouseTransferGridView.Update();
            WarehouseTransferGridView.Refresh();

            List <Product> data;
            ReportManager  report = new ReportManager();

            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);

            WarehouseTransferGridView.DataSource = source;
        }
コード例 #8
0
        public void LoadMachineTransferGridView()
        {
            MachineTransferGridView.DataSource = null;
            MachineTransferGridView.Update();
            MachineTransferGridView.Refresh();

            List <Machine> data = new List <Machine>();

            data.Add(machine);
            ReportManager report = new ReportManager();
            DataTable     source = report.reportProductPriceByMachine(data);

            MachineTransferGridView.DataSource = source;
        }
コード例 #9
0
        private void RestockByMachineCSV_Click(object sender, EventArgs e)
        {
            List <Machine> machineList;
            ReportManager  report = new ReportManager();

            machineList = this.database.SelectAllMachine();
            DataTable subtotals = report.reportRestockByMachine(machineList);

            Export export = new Export();

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();

            csvOK.Show();
        }
コード例 #10
0
 //MACHINE TABS ==> load data on tab change
 private void MachineTabs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (MachineTabs.SelectedTab == AllMachines)
     {
         List <Machine> data;
         data = this.database.SelectAllMachine();
         MachineListAllDataGrid.DataSource = data;
     }
     else if (MachineTabs.SelectedTab == ItemsByMachine)
     {
         List <Machine> data;
         data = this.database.SelectAllMachine();
         ReportManager report = new ReportManager();
         DataTable     source = report.reportProductByMachine(data);
         MachineProductItemsDataGrid.DataSource = source;
     }
 }
コード例 #11
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();
        }
コード例 #12
0
        private void button13_Click(object sender, EventArgs e)
        {
            List <Transactions> data;
            ReportManager       report = new ReportManager();

            data = this.database.SelectAllTransactions();

            DataTable subtotals = report.reportSalesByMachine(data);

            Export export = new Export();

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();

            csvOK.Show();
        }
コード例 #13
0
        private void SalesByMachineProduct_Click(object sender, EventArgs e)
        {
            List <Transactions> data;
            List <Machine>      machineList;
            ReportManager       report = new ReportManager();

            data        = this.database.SelectAllTransactions();
            machineList = this.database.SelectAllMachine();
            DataTable subtotals = report.reportSalesByProductPerMachine(data, machineList);

            Export export = new Export();

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();

            csvOK.Show();
        }
コード例 #14
0
        private void ChartSalesByProduct_Load(object sender, EventArgs e)
        {
            List<Transactions> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllTransactions();
            DataTable subtotals = report.reportSalesByItem(data);

            SalesByProduct.DataSource = subtotals;

            SalesByProduct.Titles.Add("Net Profit by Product");

            string productName = subtotals.Columns[0].ToString();
            SalesByProduct.Series["Series 1"].XValueMember = productName;

            string netProfit = subtotals.Columns[1].ToString();
            SalesByProduct.Series["Series 1"].YValueMembers = netProfit;

            SalesByProduct.DataBind();
        }
コード例 #15
0
        private void ChartSalesByProduct_Load(object sender, EventArgs e)
        {
            List <Transactions> data;
            ReportManager       report = new ReportManager();

            data = this.database.SelectAllTransactions();
            DataTable subtotals = report.reportSalesByItem(data);

            SalesByProduct.DataSource = subtotals;

            SalesByProduct.Titles.Add("Net Profit by Product");

            string productName = subtotals.Columns[0].ToString();

            SalesByProduct.Series["Series 1"].XValueMember = productName;

            string netProfit = subtotals.Columns[1].ToString();

            SalesByProduct.Series["Series 1"].YValueMembers = netProfit;

            SalesByProduct.DataBind();
        }
コード例 #16
0
        //
        // Load/Refresh Full Datagrid views
        //
        public void LoadProductWarehouseDataGrid()
        {
            ProductWarehouseDataGrid.DataSource = null;
            ProductWarehouseDataGrid.Update();
            ProductWarehouseDataGrid.Refresh();

            List<Product> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);
            ProductWarehouseDataGrid.DataSource = source;
        }
コード例 #17
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        private void StartUp_Load(object sender, EventArgs e)
        {
            List<Product> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllProduct();
            DataTable source = report.reportProductWarehouse(data);
            ProductWarehouseDataGrid.DataSource = source;

            this.LoadCityMachinesDataGrid();

            List<Machine> data2;
            data2 = this.database.SelectAllMachine();
            MachineListAllDataGrid.DataSource = data2;

            List<Transactions> data3;
            ReportManager report2 = new ReportManager();
            data3 = this.database.SelectAllTransactions();
            DataTable subtotals = report2.reportSalesByItem(data3);
            SalesProductGrid.DataSource = subtotals;

            treeView1.ExpandAll();
            treeView2.ExpandAll();
        }
コード例 #18
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        private void CSVSalesByProduct_Click(object sender, EventArgs e)
        {
            List<Transactions> data;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllTransactions();

            DataTable subtotals = report.reportSalesByItem(data);

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();
            csvOK.Show();
        }
コード例 #19
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
 //CITY TABS ==> load data on tab change
 private void CityTabs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CityTabs.SelectedTab == CityList)
     {
         this.LoadCityMachinesDataGrid();
     }
     else if (CityTabs.SelectedTab == RevenueByCity)
     {
         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.reportRevenueByCity(data, machineList, cityList);
         CityTotalRevenueDataGrid.DataSource = subtotals;
     }
     else if (CityTabs.SelectedTab == ItemSalesByCity)
     {
         List<Transactions> data;
         List<City> cities;
         List<Machine> machines;
         ReportManager report = new ReportManager();
         data = this.database.SelectAllTransactions();
         cities = this.database.SelectAllCity();
         machines = this.database.SelectAllMachine();
         DataTable source = report.reportSalesByCityAndItem(data, cities, machines);
         CitySalesByItemDataGrid.DataSource = source;
     }
 }
コード例 #20
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
 //MACHINE TABS ==> load data on tab change
 private void MachineTabs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (MachineTabs.SelectedTab == AllMachines)
     {
         List<Machine> data;
         data = this.database.SelectAllMachine();
         MachineListAllDataGrid.DataSource = data;
     }
     else if (MachineTabs.SelectedTab == ItemsByMachine)
     {
         List<Machine> data;
         data = this.database.SelectAllMachine();
         ReportManager report = new ReportManager();
         DataTable source = report.reportProductByMachine(data);
         MachineProductItemsDataGrid.DataSource = source;
     }
 }
コード例 #21
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        //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;
            }
        }
コード例 #22
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        private void RestockByMachineCSV_Click(object sender, EventArgs e)
        {
            List<Machine> machineList;
            ReportManager report = new ReportManager();
            machineList = this.database.SelectAllMachine();
            DataTable subtotals = report.reportRestockByMachine(machineList);

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();
            csvOK.Show();
        }
コード例 #23
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;
            }
        }
コード例 #24
0
ファイル: StartUp.cs プロジェクト: rroethle/VendingManagement
        private void SalesByMachineProduct_Click(object sender, EventArgs e)
        {
            List<Transactions> data;
            List<Machine> machineList;
            ReportManager report = new ReportManager();
            data = this.database.SelectAllTransactions();
            machineList = this.database.SelectAllMachine();
            DataTable subtotals = report.reportSalesByProductPerMachine(data, machineList);

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

            CSVCreatedDialog csvOK = new CSVCreatedDialog();
            csvOK.Show();
        }