diff --git a/.vs/Data-Dashboard-CSharp-SQL-WinForms/v16/.suo b/.vs/Data-Dashboard-CSharp-SQL-WinForms/v16/.suo
new file mode 100644
index 0000000..a8970dd
Binary files /dev/null and b/.vs/Data-Dashboard-CSharp-SQL-WinForms/v16/.suo differ
diff --git a/.vs/DataDashboardApp/v16/.suo b/.vs/DataDashboardApp/v16/.suo
new file mode 100644
index 0000000..154627a
Binary files /dev/null and b/.vs/DataDashboardApp/v16/.suo differ
diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json
new file mode 100644
index 0000000..f8b4888
--- /dev/null
+++ b/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..eaa5b07
--- /dev/null
+++ b/.vs/VSWorkspaceState.json
@@ -0,0 +1,7 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "SelectedNode": "\\DataDashboardApp.sln",
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
new file mode 100644
index 0000000..7f3a527
Binary files /dev/null and b/.vs/slnx.sqlite differ
diff --git a/DataDashboardApp/Form1.Designer.cs b/DataDashboardApp/Form1.Designer.cs
index 90b55e7..a6debb5 100644
--- a/DataDashboardApp/Form1.Designer.cs
+++ b/DataDashboardApp/Form1.Designer.cs
@@ -29,14 +29,16 @@ protected override void Dispose(bool disposing)
///
private void InitializeComponent()
{
- System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
- System.Windows.Forms.DataVisualization.Charting.Title title3 = new System.Windows.Forms.DataVisualization.Charting.Title();
- System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend4 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
- System.Windows.Forms.DataVisualization.Charting.Title title4 = new System.Windows.Forms.DataVisualization.Charting.Title();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.dtpStartDate = new System.Windows.Forms.DateTimePicker();
this.dtpEndDate = new System.Windows.Forms.DateTimePicker();
@@ -47,12 +49,15 @@ private void InitializeComponent()
this.btnCustomDate = new System.Windows.Forms.Button();
this.btnOkCustomDate = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
+ this.label3 = new System.Windows.Forms.Label();
this.lblNumOrders = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
+ this.label10 = new System.Windows.Forms.Label();
this.lblTotalRevenue = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
+ this.label11 = new System.Windows.Forms.Label();
this.lblTotalProfit = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.chartGrossRevenue = new System.Windows.Forms.DataVisualization.Charting.Chart();
@@ -68,9 +73,9 @@ private void InitializeComponent()
this.panel5 = new System.Windows.Forms.Panel();
this.dgvUnderstock = new System.Windows.Forms.DataGridView();
this.label13 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label11 = new System.Windows.Forms.Label();
+ this.lblStartDate = new System.Windows.Forms.Label();
+ this.lblEndDate = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@@ -85,6 +90,7 @@ private void InitializeComponent()
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(147, 31);
@@ -97,10 +103,11 @@ private void InitializeComponent()
this.dtpStartDate.Enabled = false;
this.dtpStartDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
- this.dtpStartDate.Location = new System.Drawing.Point(218, 18);
+ this.dtpStartDate.Location = new System.Drawing.Point(192, 18);
this.dtpStartDate.Name = "dtpStartDate";
- this.dtpStartDate.Size = new System.Drawing.Size(122, 20);
+ this.dtpStartDate.Size = new System.Drawing.Size(128, 20);
this.dtpStartDate.TabIndex = 1;
+ this.dtpStartDate.ValueChanged += new System.EventHandler(this.dtpStartDate_ValueChanged);
//
// dtpEndDate
//
@@ -110,11 +117,16 @@ private void InitializeComponent()
this.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpEndDate.Location = new System.Drawing.Point(364, 18);
this.dtpEndDate.Name = "dtpEndDate";
- this.dtpEndDate.Size = new System.Drawing.Size(122, 20);
+ this.dtpEndDate.Size = new System.Drawing.Size(128, 20);
this.dtpEndDate.TabIndex = 2;
+ this.dtpEndDate.ValueChanged += new System.EventHandler(this.dtpEndDate_ValueChanged);
//
// btnThisMonth
//
+ this.btnThisMonth.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ this.btnThisMonth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnThisMonth.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnThisMonth.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
this.btnThisMonth.Location = new System.Drawing.Point(1060, 10);
this.btnThisMonth.Margin = new System.Windows.Forms.Padding(5);
this.btnThisMonth.Name = "btnThisMonth";
@@ -126,7 +138,11 @@ private void InitializeComponent()
//
// btnLast30Days
//
- this.btnLast30Days.Location = new System.Drawing.Point(929, 10);
+ this.btnLast30Days.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ this.btnLast30Days.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnLast30Days.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnLast30Days.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.btnLast30Days.Location = new System.Drawing.Point(931, 10);
this.btnLast30Days.Margin = new System.Windows.Forms.Padding(5);
this.btnLast30Days.Name = "btnLast30Days";
this.btnLast30Days.Size = new System.Drawing.Size(130, 35);
@@ -137,18 +153,26 @@ private void InitializeComponent()
//
// btnLast7Days
//
- this.btnLast7Days.Location = new System.Drawing.Point(798, 10);
+ this.btnLast7Days.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ this.btnLast7Days.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnLast7Days.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnLast7Days.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.btnLast7Days.Location = new System.Drawing.Point(802, 10);
this.btnLast7Days.Margin = new System.Windows.Forms.Padding(5);
this.btnLast7Days.Name = "btnLast7Days";
this.btnLast7Days.Size = new System.Drawing.Size(130, 35);
this.btnLast7Days.TabIndex = 5;
- this.btnLast7Days.Text = "Lasta 7 days";
+ this.btnLast7Days.Text = "Last 7 days";
this.btnLast7Days.UseVisualStyleBackColor = true;
this.btnLast7Days.Click += new System.EventHandler(this.btnLast7Days_Click);
//
// btnToday
//
- this.btnToday.Location = new System.Drawing.Point(667, 10);
+ this.btnToday.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ this.btnToday.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnToday.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnToday.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.btnToday.Location = new System.Drawing.Point(673, 10);
this.btnToday.Margin = new System.Windows.Forms.Padding(5);
this.btnToday.Name = "btnToday";
this.btnToday.Size = new System.Drawing.Size(130, 35);
@@ -159,7 +183,11 @@ private void InitializeComponent()
//
// btnCustomDate
//
- this.btnCustomDate.Location = new System.Drawing.Point(536, 10);
+ this.btnCustomDate.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ this.btnCustomDate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnCustomDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnCustomDate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.btnCustomDate.Location = new System.Drawing.Point(544, 10);
this.btnCustomDate.Margin = new System.Windows.Forms.Padding(5);
this.btnCustomDate.Name = "btnCustomDate";
this.btnCustomDate.Size = new System.Drawing.Size(130, 35);
@@ -170,19 +198,24 @@ private void InitializeComponent()
//
// btnOkCustomDate
//
- this.btnOkCustomDate.Location = new System.Drawing.Point(498, 10);
+ this.btnOkCustomDate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(88)))), ((int)(((byte)(127)))));
+ this.btnOkCustomDate.FlatAppearance.BorderSize = 0;
+ this.btnOkCustomDate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnOkCustomDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnOkCustomDate.ForeColor = System.Drawing.Color.White;
+ this.btnOkCustomDate.Location = new System.Drawing.Point(505, 10);
this.btnOkCustomDate.Margin = new System.Windows.Forms.Padding(5);
this.btnOkCustomDate.Name = "btnOkCustomDate";
- this.btnOkCustomDate.Size = new System.Drawing.Size(35, 35);
+ this.btnOkCustomDate.Size = new System.Drawing.Size(39, 35);
this.btnOkCustomDate.TabIndex = 8;
- this.btnOkCustomDate.Text = "Ok";
- this.btnOkCustomDate.UseVisualStyleBackColor = true;
+ this.btnOkCustomDate.Text = "✔️";
+ this.btnOkCustomDate.UseVisualStyleBackColor = false;
this.btnOkCustomDate.Visible = false;
this.btnOkCustomDate.Click += new System.EventHandler(this.btnOkCustomDate_Click);
//
// panel1
//
- this.panel1.BackColor = System.Drawing.Color.White;
+ this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.lblNumOrders);
this.panel1.Controls.Add(this.label2);
@@ -192,10 +225,22 @@ private void InitializeComponent()
this.panel1.Size = new System.Drawing.Size(278, 73);
this.panel1.TabIndex = 9;
//
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+ this.label3.Location = new System.Drawing.Point(225, 27);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(50, 20);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "+15%";
+ //
// lblNumOrders
//
this.lblNumOrders.AutoSize = true;
this.lblNumOrders.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblNumOrders.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblNumOrders.Location = new System.Drawing.Point(74, 34);
this.lblNumOrders.Name = "lblNumOrders";
this.lblNumOrders.Size = new System.Drawing.Size(78, 25);
@@ -215,7 +260,7 @@ private void InitializeComponent()
//
// panel2
//
- this.panel2.BackColor = System.Drawing.Color.White;
+ this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
this.panel2.Controls.Add(this.label10);
this.panel2.Controls.Add(this.lblTotalRevenue);
this.panel2.Controls.Add(this.label4);
@@ -225,10 +270,22 @@ private void InitializeComponent()
this.panel2.Size = new System.Drawing.Size(458, 73);
this.panel2.TabIndex = 10;
//
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
+ this.label10.Location = new System.Drawing.Point(405, 27);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(50, 20);
+ this.label10.TabIndex = 3;
+ this.label10.Text = "+21%";
+ //
// lblTotalRevenue
//
this.lblTotalRevenue.AutoSize = true;
this.lblTotalRevenue.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblTotalRevenue.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblTotalRevenue.Location = new System.Drawing.Point(74, 34);
this.lblTotalRevenue.Name = "lblTotalRevenue";
this.lblTotalRevenue.Size = new System.Drawing.Size(78, 25);
@@ -248,7 +305,7 @@ private void InitializeComponent()
//
// panel3
//
- this.panel3.BackColor = System.Drawing.Color.White;
+ this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
this.panel3.Controls.Add(this.label11);
this.panel3.Controls.Add(this.lblTotalProfit);
this.panel3.Controls.Add(this.label5);
@@ -258,10 +315,22 @@ private void InitializeComponent()
this.panel3.Size = new System.Drawing.Size(420, 73);
this.panel3.TabIndex = 11;
//
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
+ this.label11.Location = new System.Drawing.Point(367, 27);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(50, 20);
+ this.label11.TabIndex = 3;
+ this.label11.Text = "+19%";
+ //
// lblTotalProfit
//
this.lblTotalProfit.AutoSize = true;
this.lblTotalProfit.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblTotalProfit.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblTotalProfit.Location = new System.Drawing.Point(74, 34);
this.lblTotalProfit.Name = "lblTotalProfit";
this.lblTotalProfit.Size = new System.Drawing.Size(78, 25);
@@ -281,61 +350,106 @@ private void InitializeComponent()
//
// chartGrossRevenue
//
- chartArea3.Name = "ChartArea1";
- this.chartGrossRevenue.ChartAreas.Add(chartArea3);
- legend3.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
- legend3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
- legend3.IsTextAutoFit = false;
- legend3.Name = "Legend1";
- this.chartGrossRevenue.Legends.Add(legend3);
+ this.chartGrossRevenue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ chartArea1.AxisX.IsMarginVisible = false;
+ chartArea1.AxisX.LabelStyle.ForeColor = System.Drawing.Color.Silver;
+ chartArea1.AxisX.LineColor = System.Drawing.Color.White;
+ chartArea1.AxisX.LineWidth = 0;
+ chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.White;
+ chartArea1.AxisX.MajorGrid.LineWidth = 0;
+ chartArea1.AxisX.MajorTickMark.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(75)))), ((int)(((byte)(111)))));
+ chartArea1.AxisX.MajorTickMark.Size = 3F;
+ chartArea1.AxisY.LabelStyle.ForeColor = System.Drawing.Color.Silver;
+ chartArea1.AxisY.LabelStyle.Format = "${0:0,}K";
+ chartArea1.AxisY.LineColor = System.Drawing.Color.White;
+ chartArea1.AxisY.LineWidth = 0;
+ chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(75)))), ((int)(((byte)(111)))));
+ chartArea1.AxisY.MajorTickMark.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(75)))), ((int)(((byte)(111)))));
+ chartArea1.AxisY.MajorTickMark.LineWidth = 0;
+ chartArea1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ chartArea1.Name = "ChartArea1";
+ this.chartGrossRevenue.ChartAreas.Add(chartArea1);
+ legend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+ legend1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
+ legend1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
+ legend1.IsTextAutoFit = false;
+ legend1.Name = "Legend1";
+ this.chartGrossRevenue.Legends.Add(legend1);
this.chartGrossRevenue.Location = new System.Drawing.Point(14, 138);
this.chartGrossRevenue.Margin = new System.Windows.Forms.Padding(5);
this.chartGrossRevenue.Name = "chartGrossRevenue";
- series3.ChartArea = "ChartArea1";
- series3.Legend = "Legend1";
- series3.Name = "Series1";
- this.chartGrossRevenue.Series.Add(series3);
+ series1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.LeftRight;
+ series1.BackSecondaryColor = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255)))));
+ series1.BorderWidth = 3;
+ series1.ChartArea = "ChartArea1";
+ series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.SplineArea;
+ series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(88)))), ((int)(((byte)(127)))));
+ series1.Legend = "Legend1";
+ series1.MarkerBorderColor = System.Drawing.Color.MediumPurple;
+ series1.MarkerSize = 10;
+ series1.Name = "Series1";
+ this.chartGrossRevenue.Series.Add(series1);
this.chartGrossRevenue.Size = new System.Drawing.Size(846, 255);
this.chartGrossRevenue.TabIndex = 12;
this.chartGrossRevenue.Text = "chartGrossRevenue";
- title3.Alignment = System.Drawing.ContentAlignment.TopLeft;
- title3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
- title3.Name = "Title1";
- title3.Text = "Gross revenue";
- this.chartGrossRevenue.Titles.Add(title3);
+ title1.Alignment = System.Drawing.ContentAlignment.TopLeft;
+ title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
+ title1.ForeColor = System.Drawing.Color.WhiteSmoke;
+ title1.Name = "Title1";
+ title1.Text = "Gross revenue";
+ this.chartGrossRevenue.Titles.Add(title1);
//
// chartTopProducts
//
- chartArea4.Name = "ChartArea1";
- this.chartTopProducts.ChartAreas.Add(chartArea4);
- legend4.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Bottom;
- legend4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
- legend4.IsTextAutoFit = false;
- legend4.Name = "Legend1";
- this.chartTopProducts.Legends.Add(legend4);
+ this.chartTopProducts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ chartArea2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ chartArea2.Name = "ChartArea1";
+ this.chartTopProducts.ChartAreas.Add(chartArea2);
+ legend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ legend2.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Bottom;
+ legend2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+ legend2.ForeColor = System.Drawing.Color.Gainsboro;
+ legend2.IsTextAutoFit = false;
+ legend2.Name = "Legend1";
+ this.chartTopProducts.Legends.Add(legend2);
this.chartTopProducts.Location = new System.Drawing.Point(870, 138);
this.chartTopProducts.Margin = new System.Windows.Forms.Padding(5);
this.chartTopProducts.Name = "chartTopProducts";
- series4.ChartArea = "ChartArea1";
- series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
- series4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
- series4.IsValueShownAsLabel = true;
- series4.LabelForeColor = System.Drawing.Color.White;
- series4.Legend = "Legend1";
- series4.Name = "Series1";
- this.chartTopProducts.Series.Add(series4);
+ this.chartTopProducts.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None;
+ this.chartTopProducts.PaletteCustomColors = new System.Drawing.Color[] {
+ System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(160)))), ((int)(((byte)(139))))),
+ System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(188)))), ((int)(((byte)(0))))),
+ System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(88)))), ((int)(((byte)(127))))),
+ System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(220)))), ((int)(((byte)(205))))),
+ System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(255))))),
+ System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(153)))), ((int)(((byte)(254)))))};
+ series2.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.DiagonalRight;
+ series2.BackSecondaryColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(159)))), ((int)(((byte)(255)))));
+ series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ series2.BorderWidth = 8;
+ series2.ChartArea = "ChartArea1";
+ series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
+ series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
+ series2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+ series2.IsValueShownAsLabel = true;
+ series2.LabelForeColor = System.Drawing.Color.White;
+ series2.Legend = "Legend1";
+ series2.Name = "Series1";
+ this.chartTopProducts.Series.Add(series2);
this.chartTopProducts.Size = new System.Drawing.Size(320, 495);
this.chartTopProducts.TabIndex = 13;
this.chartTopProducts.Text = "chartTopProducts";
- title4.Alignment = System.Drawing.ContentAlignment.TopLeft;
- title4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
- title4.Name = "Title1";
- title4.Text = "5 Best selling products";
- this.chartTopProducts.Titles.Add(title4);
+ title2.Alignment = System.Drawing.ContentAlignment.TopLeft;
+ title2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
+ title2.ForeColor = System.Drawing.Color.WhiteSmoke;
+ title2.Name = "Title1";
+ title2.Text = "5 Best selling products";
+ this.chartTopProducts.Titles.Add(title2);
//
// panel4
//
- this.panel4.BackColor = System.Drawing.Color.White;
+ this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
this.panel4.Controls.Add(this.lblNumProducts);
this.panel4.Controls.Add(this.label9);
this.panel4.Controls.Add(this.lblNumSuppliers);
@@ -353,6 +467,7 @@ private void InitializeComponent()
//
this.lblNumProducts.AutoSize = true;
this.lblNumProducts.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblNumProducts.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblNumProducts.Location = new System.Drawing.Point(59, 185);
this.lblNumProducts.Name = "lblNumProducts";
this.lblNumProducts.Size = new System.Drawing.Size(78, 25);
@@ -374,6 +489,7 @@ private void InitializeComponent()
//
this.lblNumSuppliers.AutoSize = true;
this.lblNumSuppliers.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblNumSuppliers.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblNumSuppliers.Location = new System.Drawing.Point(59, 125);
this.lblNumSuppliers.Name = "lblNumSuppliers";
this.lblNumSuppliers.Size = new System.Drawing.Size(78, 25);
@@ -395,6 +511,7 @@ private void InitializeComponent()
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label7.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label7.Location = new System.Drawing.Point(10, 10);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(141, 25);
@@ -405,6 +522,7 @@ private void InitializeComponent()
//
this.lblNumCustomers.AutoSize = true;
this.lblNumCustomers.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblNumCustomers.ForeColor = System.Drawing.Color.WhiteSmoke;
this.lblNumCustomers.Location = new System.Drawing.Point(59, 65);
this.lblNumCustomers.Name = "lblNumCustomers";
this.lblNumCustomers.Size = new System.Drawing.Size(78, 25);
@@ -424,9 +542,10 @@ private void InitializeComponent()
//
// panel5
//
- this.panel5.BackColor = System.Drawing.Color.White;
+ this.panel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
this.panel5.Controls.Add(this.dgvUnderstock);
this.panel5.Controls.Add(this.label13);
+ this.panel5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel5.Location = new System.Drawing.Point(254, 403);
this.panel5.Margin = new System.Windows.Forms.Padding(5);
this.panel5.Name = "panel5";
@@ -435,10 +554,36 @@ private void InitializeComponent()
//
// dgvUnderstock
//
+ this.dgvUnderstock.AllowUserToResizeRows = false;
this.dgvUnderstock.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dgvUnderstock.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ this.dgvUnderstock.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.dgvUnderstock.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
+ this.dgvUnderstock.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.dgvUnderstock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvUnderstock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(45)))), ((int)(((byte)(86)))));
+ dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Silver;
+ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(122)))), ((int)(((byte)(133)))));
+ dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
+ dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvUnderstock.DefaultCellStyle = dataGridViewCellStyle2;
+ this.dgvUnderstock.EnableHeadersVisualStyles = false;
+ this.dgvUnderstock.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(75)))), ((int)(((byte)(111)))));
this.dgvUnderstock.Location = new System.Drawing.Point(15, 45);
this.dgvUnderstock.Name = "dgvUnderstock";
+ this.dgvUnderstock.RowHeadersVisible = false;
+ this.dgvUnderstock.RowTemplate.Height = 35;
+ this.dgvUnderstock.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvUnderstock.Size = new System.Drawing.Size(574, 185);
this.dgvUnderstock.TabIndex = 3;
//
@@ -446,50 +591,62 @@ private void InitializeComponent()
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label13.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label13.Location = new System.Drawing.Point(10, 10);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(179, 25);
this.label13.TabIndex = 2;
this.label13.Text = "Low stock products";
//
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
- this.label3.Location = new System.Drawing.Point(225, 27);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(50, 20);
- this.label3.TabIndex = 2;
- this.label3.Text = "+15%";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
- this.label10.Location = new System.Drawing.Point(405, 27);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(50, 20);
- this.label10.TabIndex = 3;
- this.label10.Text = "+21%";
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
- this.label11.Location = new System.Drawing.Point(367, 27);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(50, 20);
- this.label11.TabIndex = 3;
- this.label11.Text = "+19%";
+ // lblStartDate
+ //
+ this.lblStartDate.AutoSize = true;
+ this.lblStartDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblStartDate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.lblStartDate.Location = new System.Drawing.Point(192, 18);
+ this.lblStartDate.MinimumSize = new System.Drawing.Size(130, 0);
+ this.lblStartDate.Name = "lblStartDate";
+ this.lblStartDate.Size = new System.Drawing.Size(130, 20);
+ this.lblStartDate.TabIndex = 4;
+ this.lblStartDate.Text = "Aug 06, 2023";
+ this.lblStartDate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.lblStartDate.Click += new System.EventHandler(this.lblStartDate_Click);
+ //
+ // lblEndDate
+ //
+ this.lblEndDate.AutoSize = true;
+ this.lblEndDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblEndDate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.lblEndDate.Location = new System.Drawing.Point(362, 18);
+ this.lblEndDate.MinimumSize = new System.Drawing.Size(130, 0);
+ this.lblEndDate.Name = "lblEndDate";
+ this.lblEndDate.Size = new System.Drawing.Size(130, 20);
+ this.lblEndDate.TabIndex = 14;
+ this.lblEndDate.Text = "Aug 06, 2023";
+ this.lblEndDate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.lblEndDate.Click += new System.EventHandler(this.lblEndDate_Click);
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(141)))), ((int)(((byte)(181)))));
+ this.label12.Location = new System.Drawing.Point(336, 18);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(14, 20);
+ this.label12.TabIndex = 15;
+ this.label12.Text = "-";
+ this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(28)))), ((int)(((byte)(63)))));
this.ClientSize = new System.Drawing.Size(1204, 641);
+ this.Controls.Add(this.label12);
+ this.Controls.Add(this.lblEndDate);
+ this.Controls.Add(this.lblStartDate);
this.Controls.Add(this.panel5);
this.Controls.Add(this.panel4);
this.Controls.Add(this.chartTopProducts);
@@ -510,6 +667,7 @@ private void InitializeComponent()
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Form1";
this.Text = "Store statistics";
+ this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
@@ -564,5 +722,8 @@ private void InitializeComponent()
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label lblStartDate;
+ private System.Windows.Forms.Label lblEndDate;
+ private System.Windows.Forms.Label label12;
}
}
\ No newline at end of file
diff --git a/DataDashboardApp/Form1.cs b/DataDashboardApp/Form1.cs
index e89f2a4..b8e3104 100644
--- a/DataDashboardApp/Form1.cs
+++ b/DataDashboardApp/Form1.cs
@@ -15,6 +15,7 @@ public partial class Form1 : Form
{
//Fields
private Dashboard model;
+ private Button currentButton;
//Constructor
public Form1()
@@ -24,7 +25,7 @@ public Form1()
dtpStartDate.Value = DateTime.Today.AddDays(-7);
dtpEndDate.Value = DateTime.Now;
btnLast7Days.Select();
-
+ SetDataMenuButtonsUI(btnLast7Days);
model = new Dashboard();
LoadData();
}
@@ -60,11 +61,39 @@ private void LoadData()
}
else Console.WriteLine("View not loaded, same query");
}
- private void DisableCustomDates()
+ private void SetDataMenuButtonsUI(object button)
{
- dtpStartDate.Enabled = false;
- dtpEndDate.Enabled = false;
- btnOkCustomDate.Visible = false;
+ var btn = (Button)button;
+ //Highligh button
+ btn.BackColor = btnLast30Days.FlatAppearance.BorderColor;
+ btn.ForeColor = Color.White;
+ //Unhighlight button
+ if (currentButton != null&¤tButton!=btn)
+ {
+ currentButton.BackColor = this.BackColor;
+ currentButton.ForeColor = Color.FromArgb(124, 141, 181);
+ }
+ currentButton = btn;//Set current button
+
+ //Enable custom dates
+ if(btn==btnCustomDate)
+ {
+ dtpStartDate.Enabled = true;
+ dtpEndDate.Enabled = true;
+ btnOkCustomDate.Visible = true;
+ lblStartDate.Cursor = Cursors.Hand;
+ lblEndDate.Cursor = Cursors.Hand;
+ }
+ //Disable custom dates
+ else
+ {
+ dtpStartDate.Enabled = false;
+ dtpEndDate.Enabled = false;
+ btnOkCustomDate.Visible = false;
+ lblStartDate.Cursor = Cursors.Default;
+ lblEndDate.Cursor = Cursors.Default;
+ }
+
}
//Event methods
@@ -73,7 +102,7 @@ private void btnToday_Click(object sender, EventArgs e)
dtpStartDate.Value = DateTime.Today;
dtpEndDate.Value = DateTime.Now;
LoadData();
- DisableCustomDates();
+ SetDataMenuButtonsUI(sender);
}
private void btnLast7Days_Click(object sender, EventArgs e)
@@ -81,7 +110,7 @@ private void btnLast7Days_Click(object sender, EventArgs e)
dtpStartDate.Value = DateTime.Today.AddDays(-7);
dtpEndDate.Value = DateTime.Now;
LoadData();
- DisableCustomDates();
+ SetDataMenuButtonsUI(sender);
}
private void btnLast30Days_Click(object sender, EventArgs e)
@@ -89,7 +118,7 @@ private void btnLast30Days_Click(object sender, EventArgs e)
dtpStartDate.Value = DateTime.Today.AddDays(-30);
dtpEndDate.Value = DateTime.Now;
LoadData();
- DisableCustomDates();
+ SetDataMenuButtonsUI(sender);
}
private void btnThisMonth_Click(object sender, EventArgs e)
@@ -97,19 +126,52 @@ private void btnThisMonth_Click(object sender, EventArgs e)
dtpStartDate.Value = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
dtpEndDate.Value = DateTime.Now;
LoadData();
- DisableCustomDates();
+ SetDataMenuButtonsUI(sender);
}
private void btnCustomDate_Click(object sender, EventArgs e)
{
- dtpStartDate.Enabled = true;
- dtpEndDate.Enabled = true;
- btnOkCustomDate.Visible = true;
+ SetDataMenuButtonsUI(sender);
}
private void btnOkCustomDate_Click(object sender, EventArgs e)
{
LoadData();
}
+
+ private void lblStartDate_Click(object sender, EventArgs e)
+ {
+ if (currentButton == btnCustomDate)
+ {
+ dtpStartDate.Select();
+ SendKeys.Send("%{DOWN}");
+ }
+ }
+
+ private void lblEndDate_Click(object sender, EventArgs e)
+ {
+ if (currentButton == btnCustomDate)
+ {
+ dtpEndDate.Select();
+ SendKeys.Send("%{DOWN}");
+ }
+ }
+
+ private void dtpStartDate_ValueChanged(object sender, EventArgs e)
+ {
+ lblStartDate.Text = dtpStartDate.Text;
+ }
+
+ private void dtpEndDate_ValueChanged(object sender, EventArgs e)
+ {
+ lblEndDate.Text = dtpEndDate.Text;
+ }
+
+ private void Form1_Load(object sender, EventArgs e)
+ {
+ lblStartDate.Text = dtpStartDate.Text;
+ lblEndDate.Text = dtpEndDate.Text;
+ dgvUnderstock.Columns[1].Width = 50;
+ }
}
}
diff --git a/DataDashboardApp/bin/Debug/DashboardApp.exe b/DataDashboardApp/bin/Debug/DashboardApp.exe
index d1318dd..b1c52d0 100644
Binary files a/DataDashboardApp/bin/Debug/DashboardApp.exe and b/DataDashboardApp/bin/Debug/DashboardApp.exe differ
diff --git a/DataDashboardApp/bin/Debug/DashboardApp.pdb b/DataDashboardApp/bin/Debug/DashboardApp.pdb
index 030a11f..26e4d68 100644
Binary files a/DataDashboardApp/bin/Debug/DashboardApp.pdb and b/DataDashboardApp/bin/Debug/DashboardApp.pdb differ
diff --git a/DataDashboardApp/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs b/DataDashboardApp/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs
new file mode 100644
index 0000000..e5dc9b8
--- /dev/null
+++ b/DataDashboardApp/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
diff --git a/DataDashboardApp/obj/Debug/DashboardApp.csproj.AssemblyReference.cache b/DataDashboardApp/obj/Debug/DashboardApp.csproj.AssemblyReference.cache
index 1e52c20..f5e894a 100644
Binary files a/DataDashboardApp/obj/Debug/DashboardApp.csproj.AssemblyReference.cache and b/DataDashboardApp/obj/Debug/DashboardApp.csproj.AssemblyReference.cache differ
diff --git a/DataDashboardApp/obj/Debug/DashboardApp.csproj.FileListAbsolute.txt b/DataDashboardApp/obj/Debug/DashboardApp.csproj.FileListAbsolute.txt
index 82e7b1a..dc41b1c 100644
--- a/DataDashboardApp/obj/Debug/DashboardApp.csproj.FileListAbsolute.txt
+++ b/DataDashboardApp/obj/Debug/DashboardApp.csproj.FileListAbsolute.txt
@@ -8,3 +8,13 @@ D:\RJ Code Advance\Source Code C#\2022\DataDashboardApp\DataDashboardApp\obj\Deb
D:\RJ Code Advance\Source Code C#\2022\DataDashboardApp\DataDashboardApp\obj\Debug\DashboardApp.exe
D:\RJ Code Advance\Source Code C#\2022\DataDashboardApp\DataDashboardApp\obj\Debug\DashboardApp.pdb
D:\RJ Code Advance\Source Code C#\2022\DataDashboardApp\DataDashboardApp\obj\Debug\DashboardApp.Form1.resources
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.csproj.AssemblyReference.cache
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.Form1.resources
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.Properties.Resources.resources
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.csproj.GenerateResource.cache
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.csproj.CoreCompileInputs.cache
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.exe
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\obj\Debug\DashboardApp.pdb
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\bin\Debug\DashboardApp.exe.config
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\bin\Debug\DashboardApp.exe
+D:\GitHub\repo\Data-Dashboard-CSharp-SQL-WinForms\DataDashboardApp\bin\Debug\DashboardApp.pdb
diff --git a/DataDashboardApp/obj/Debug/DashboardApp.csproj.GenerateResource.cache b/DataDashboardApp/obj/Debug/DashboardApp.csproj.GenerateResource.cache
index 7172ccb..1a93f7d 100644
Binary files a/DataDashboardApp/obj/Debug/DashboardApp.csproj.GenerateResource.cache and b/DataDashboardApp/obj/Debug/DashboardApp.csproj.GenerateResource.cache differ
diff --git a/DataDashboardApp/obj/Debug/DashboardApp.exe b/DataDashboardApp/obj/Debug/DashboardApp.exe
index d1318dd..b1c52d0 100644
Binary files a/DataDashboardApp/obj/Debug/DashboardApp.exe and b/DataDashboardApp/obj/Debug/DashboardApp.exe differ
diff --git a/DataDashboardApp/obj/Debug/DashboardApp.pdb b/DataDashboardApp/obj/Debug/DashboardApp.pdb
index 030a11f..26e4d68 100644
Binary files a/DataDashboardApp/obj/Debug/DashboardApp.pdb and b/DataDashboardApp/obj/Debug/DashboardApp.pdb differ
diff --git a/DataDashboardApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/DataDashboardApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 96a4b7a..b062de6 100644
Binary files a/DataDashboardApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/DataDashboardApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/DataDashboardApp/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs b/DataDashboardApp/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs
new file mode 100644
index 0000000..e5dc9b8
--- /dev/null
+++ b/DataDashboardApp/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]