private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (navigationPane1.SelectedPage == navigationPage1)
            {
                new AddMaker().Show();
                ShowMaker();
            }
            else if (navigationPane1.SelectedPage == navigationPage2)
            {
                new AddProduct().Show();
                dataGridView2.DataSource = DbConn.GetData($"SELECT * FROM TypeProduct");
            }
            else if (navigationPane1.SelectedPage == navigationPage3)
            {
                new AddAssortment().Show();

                dataGridView5.DataSource = DbConn.GetDataTable("ShowPrice");
            }
            else if (navigationPane1.SelectedPage == navigationPage4)
            {
            }
            else if (navigationPane1.SelectedPage == navigationPage5)
            {
            }
            else if (navigationPane1.SelectedPage == navigationPage6)
            {
            }
            else if (navigationPane1.SelectedPage == navigationPage7)
            {
            }
            else if (navigationPane1.SelectedPage == navigationPage8)
            {
            }
        }
        private void XtraForm2_Load(object sender, EventArgs e)
        {
            dataGridView2.DataSource = DbConn.GetData($"SELECT * FROM TypeProduct");
            dataGridView1.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView2.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView3.Font       = new Font("Arial", 12.5F, GraphicsUnit.Pixel);
            dataGridView4.Font       = new Font("Arial", 12.5F, GraphicsUnit.Pixel);
            dataGridView5.Font       = new Font("Arial", 12.5F, GraphicsUnit.Pixel);
            dataGridView6.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView7.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView8.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView9.Font       = new Font("Arial", 16.5F, GraphicsUnit.Pixel);
            dataGridView3.DataSource = DbConn.GetData($"SELECT * FROM Greasiness");
            dataGridView4.DataSource = DbConn.GetData($"SELECT Packaging.Id, TypePackaging.Namee, VolumePackaging.Valuee " +
                                                      " FROM Packaging JOIN TypePackaging ON TypePackaging.ID = Packaging.TypePackagingID " +
                                                      "JOIN VolumePackaging ON VolumePackaging.ID = Packaging.VolumePackagingID ");
            dataGridView5.DataSource = DbConn.GetDataTable("ShowPrice");
            ShowMaker();
            ShowCheckProduct();
            ShowCheckUnique();
            RefreshSearchForm();

            ShowAllSale();

            CreateChartMakerProduct__Sum();
            CreateChartTypePackaging__Sum();
            CreateChartDataAffiliate__Sum();
            navigationPane1.Font = new Font("Arial", 24, GraphicsUnit.Pixel);
            navigationPage1.Font = new Font("Arial", 24F, GraphicsUnit.Pixel);
            //navigationPage1.Appearance.FontSizeDelta = 4;
            //navigationPage2.Appearance.FontSizeDelta = 1;
            //navigationPage3.Appearance.FontSizeDelta = 12;
            //navigationPage4.Appearance.FontSizeDelta = -2;
        }
        public static Control MakeChart(string proc, string dataMember, string argument, string range)//make chart
        {
            ChartControl chart = new ChartControl();

            chart.DataSource       = DbConn.GetDataTable(proc);
            chart.SeriesDataMember = dataMember;
            chart.SeriesTemplate.ArgumentDataMember = argument;
            chart.SeriesTemplate.ValueDataMembers.AddRange(new string[] { range });
            chart.SeriesTemplate.View          = new StackedBarSeriesView();
            chart.SeriesNameTemplate.BeginText = $"{dataMember}: ";
            chart.Dock = DockStyle.Fill;
            return(chart);
        }
 public void ShowCheckUnique()
 {
     dataGridView6.DataSource = DbConn.GetDataTable("ShowCheckUnique");
 }
 public void ShowCheckProduct()
 {
     dataGridView7.DataSource = DbConn.GetDataTable("ShowCheckProduct");
 }
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     dataGridView5.DataSource = DbConn.GetDataTable("ShowPrice");
 }