private void button_ForecastedDataView_Click_1(object sender, EventArgs e)
        {
            int month_min = 0;
            int month_max = 0;

            if (isMonth)
            {
                month_min = comboBox_ForecastedDateRange.SelectedIndex + 1;
                month_max = 25;
            }
            else
            {
                if (comboBox_ForecastedDateRange.SelectedIndex == 0)
                {
                    month_min = 1;
                    month_max = 3;
                }
                else if (comboBox_ForecastedDateRange.SelectedIndex == 1)
                {
                    month_min = 4;
                    month_max = 6;
                }
                else if (comboBox_ForecastedDateRange.SelectedIndex == 2)
                {
                    month_min = 7;
                    month_max = 9;
                }
                else
                {
                    month_min = 10;
                    month_max = 12;
                }
            }
            if (comboBox_ForecastedRegion.SelectedItem != null)
            {
                int    region_id       = (comboBox_ForecastedRegion.SelectedItem as Region).region_id;
                int    forecastingType = comboBox_ForecastingType.SelectedIndex;
                string number          = textBox_ForecastingNumber.Text;

                ForecastTable ft = dataArranger.getForecastTable(region_id, forecasted_yData_type, month_min, month_max, forecastingType, number, this);
                this.grid_ForecastedData.DataSource = ft;


                if (ft != null)
                {
                    this.panel_forecastedGrid.Show();
                    ForecastingMethods fm = new ForecastingMethods();
                    this.textBox_MSE.Text  = fm.MeanSignedError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MAE.Text  = fm.MeanAbsoluteError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MPE.Text  = fm.MeanPercentError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MAPE.Text = fm.MeanAbsolutePercentError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_TS.Text   = fm.TrackingSignal(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MSqE.Text = fm.MeanSquaredError(ft, false, DEFAULT_IGNORE, 0).ToString();
                    this.textBox_CSE.Text  = fm.CumulativeSignedError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_CAE.Text  = fm.CumulativeAbsoluteError(ft, false, DEFAULT_IGNORE).ToString();
                }
            }
        }
        private void button_ForecastedDataView_Click_1(object sender, EventArgs e)
        {
            int month_min = 0;
            int month_max = 0;
            if (isMonth)
            {
                month_min = comboBox_ForecastedDateRange.SelectedIndex + 1;
                month_max = 25;
            }
            else
            {
                if (comboBox_ForecastedDateRange.SelectedIndex == 0)
                {
                    month_min = 1;
                    month_max = 3;
                }
                else if (comboBox_ForecastedDateRange.SelectedIndex == 1)
                {
                    month_min = 4;
                    month_max = 6;
                }
                else if (comboBox_ForecastedDateRange.SelectedIndex == 2)
                {
                    month_min = 7;
                    month_max = 9;
                }
                else
                {
                    month_min = 10;
                    month_max = 12;
                }
            }
            if (comboBox_ForecastedRegion.SelectedItem != null)
            {
                int region_id = (comboBox_ForecastedRegion.SelectedItem as Region).region_id;
                int forecastingType = comboBox_ForecastingType.SelectedIndex;
                string number = textBox_ForecastingNumber.Text;

                ForecastTable ft = dataArranger.getForecastTable(region_id, forecasted_yData_type, month_min, month_max, forecastingType, number, this);
                this.grid_ForecastedData.DataSource = ft;

                if (ft != null)
                {
                    this.panel_forecastedGrid.Show();
                    ForecastingMethods fm = new ForecastingMethods();
                    this.textBox_MSE.Text = fm.MeanSignedError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MAE.Text = fm.MeanAbsoluteError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MPE.Text = fm.MeanPercentError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MAPE.Text = fm.MeanAbsolutePercentError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_TS.Text = fm.TrackingSignal(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_MSqE.Text = fm.MeanSquaredError(ft, false, DEFAULT_IGNORE, 0).ToString();
                    this.textBox_CSE.Text = fm.CumulativeSignedError(ft, false, DEFAULT_IGNORE).ToString();
                    this.textBox_CAE.Text = fm.CumulativeAbsoluteError(ft, false, DEFAULT_IGNORE).ToString();
                }

            }
        }