Example #1
0
 public FormForecast9SH(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
     chart_user1.SetColor += new chart_userSH.setcolor(chart_user1_SetColor);
 }
Example #2
0
        private void FrmSelforcast_Load(object sender, EventArgs e)
        {
            Ps_forecast_list report = new Ps_forecast_list();
            report.UserID = ProjectUID;  //SetCfgValue("lastLoginUserNumber", Application.ExecutablePath + ".config");
            report.Col1 = "1";
            IList listReports = Common.Services.BaseService.GetList("SelectPs_forecast_listByCOL1AndUserID", report);

               System.Data.DataTable dataTable = Itop.Common.DataConverter.ToDataTable(listReports, typeof(Ps_forecast_list));
            gridView1.BeginUpdate();
            gridControl1.DataSource = dataTable;

            gridView1.Columns["ID"].Visible = false;
            gridView1.Columns["ID"].OptionsColumn.ShowInCustomizationForm = false;
            gridView1.Columns["UserID"].Visible = false;
            gridView1.Columns["UserID"].OptionsColumn.ShowInCustomizationForm = false;
            gridView1.Columns["Col1"].Visible = false;
            gridView1.Columns["Col1"].OptionsColumn.ShowInCustomizationForm = false;
            gridView1.Columns["Col2"].Visible = false;
            gridView1.Columns["Col2"].OptionsColumn.ShowInCustomizationForm = false;

            gridView1.Columns["Title"].Caption = "Ԥ������";
            gridView1.Columns["Title"].Width = 300;
            gridView1.Columns["StartYear"].Caption = "��ʼ���";
            gridView1.Columns["EndYear"].Caption = "�������";
            gridView1.EndUpdate();
        }
Example #3
0
 public FormForecastD(Ps_forecast_list fr, int tf)
 {
     InitializeComponent();
     forecastReport = fr;
       //  typeFlag = forecastReport.ID;
     Text = fr.Title;
 }
Example #4
0
 public FormExpertSH(Ps_forecast_list fr)
 {
     forecastReport = fr;
     InitializeComponent();
     chart_user1.SetColor += new chart_userSH.setcolor(chart_user1_SetColor);
     barButtonItem1.Glyph = Itop.ICON.Resource.授权;
     barButtonItem2.Glyph = Itop.ICON.Resource.关闭;
 }
Example #5
0
 public GrayModelSH(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
     chart_user1.SetColor += new chart_userSH.setcolor(chart_user1_SetColor);
     barButtonItem14.Glyph = Itop.ICON.Resource.��Ȩ;
     barButtonItem6.Glyph = Itop.ICON.Resource.�ر�;
 }
Example #6
0
 public FormMaxHourSH(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
     chart_user1.SetColor += new chart_userSH.setcolor(chart_user1_SetColor);
     barButtonItem1.Glyph = Itop.ICON.Resource.授权;
     barButtonItem8.Glyph = Itop.ICON.Resource.关闭;
 }
 public FormForecastFResult(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
     chart_user1.SetColor += new Itop.Client.Using.chart_userSH.setcolor(chart_user1_SetColor);
     barButtonItem1.Glyph = Itop.ICON.Resource.打回重新编;
     barSubItem1.Glyph = Itop.ICON.Resource.发送;
     barButtonItem6.Glyph = Itop.ICON.Resource.刷新;
     barButtonItem2.Glyph = Itop.ICON.Resource.布局;
     barButtonItem3.Glyph = Itop.ICON.Resource.关闭;
 }
Example #8
0
        public FormSpatialforcast(Ps_forecast_list fr)
        {
            InitializeComponent();
            forecastReport = fr;
            Text = fr.Title;

            barButtonItem1.Glyph = Itop.ICON.Resource.新建;
            barButtonItem2.Glyph = Itop.ICON.Resource.修改;
            barButtonItem5.Glyph = Itop.ICON.Resource.删除;

            barSubItem1.Glyph = Itop.ICON.Resource.发送;

            barButtonItem3.Glyph = Itop.ICON.Resource.发送;
            barButtonItem8.Glyph = Itop.ICON.Resource.工具;

            barButtonItem4.Glyph = Itop.ICON.Resource.审批;
            barButtonItem7.Glyph = Itop.ICON.Resource.保存;

            barButtonItem6.Glyph = Itop.ICON.Resource.关闭;
            chart_user1.SetColor += new chart_userSH.setcolor(chart_user1_SetColor);
        }
Example #9
0
        public void MaxForecast(Ps_forecast_list forecastReport,DataTable dataTable)
        {
            foreach (DataRow dataRow in dataTable.Rows)
            {
                string id = dataRow["Col1"].ToString();

                Ps_BadData pb1 = new Ps_BadData();
                pb1.ForecastID = forecastReport.ID;
                pb1.Forecast = 2;
                pb1.Col1 = id;
                Ps_BadData pb = new Ps_BadData();
                IList<Ps_BadData> li = Common.Services.BaseService.GetList<Ps_BadData>("SelectPs_BadDataByCol1", pb1);
                if (li.Count > 0)
                {
                    pb = li[0];
                    for (int i = forecastReport.StartYear; i < forecastReport.EndYear; i++)
                    {
                        PropertyInfo pi1 = pb.GetType().GetProperty("y" + i);
                        double dl = 0;
                        double dl1 = 0;
                        try
                        {
                            dl = Convert.ToDouble(dataRow["y" + i].ToString());
                        }
                        catch { }

                        try
                        {
                            dl1 = Convert.ToDouble(pi1.GetValue(pb, null));
                        }
                        catch { }

                        dataRow["y" + i] = dl + dl1;
                    }
                }
            }
        }
Example #10
0
 public GrayModel(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
Example #11
0
        private void updateAllPan(Ps_Forecast_Math psp_TypePan, Ps_forecast_list listReports)
        {
            string strtemp = "";
            if (psp_TypePan.Forecast == 2)
            {
                strtemp = " and Title!='ͬʱ��'";
            }
            else
                if (psp_TypePan.Forecast == 3)
                {
                    strtemp = "";
                }
            IList<Ps_Forecast_Math> mathlist = Common.Services.BaseService.GetList<Ps_Forecast_Math>("SelectPs_Forecast_MathByWhere",
                          "Forecast='" + psp_TypePan.Forecast + "' and ForecastID='" + psp_TypePan.ForecastID + "' and ParentID='" + psp_TypePan.ID + "'" + strtemp+" order by sort desc");
            Ps_Forecast_Math matcgui ;
            Ps_Forecast_Math matdyh;
            Ps_Forecast_Math mattsl;

            //if (psp_TypePan.Title.Contains("���غϼ�"))
            //{
                matcgui = new Ps_Forecast_Math();//����
                matdyh = new Ps_Forecast_Math();//���û�
                mattsl = new Ps_Forecast_Math();//ͬʱ��
            //}
            double value = 0;
            double value2 = 0;
            for (int i = listReports.StartYear; i <= listReports.EndYear; i++)
            {
                value = 0;
                 value2 = 0;
                foreach (Ps_Forecast_Math mat in mathlist)
                {
                    if (psp_TypePan.Title.Contains("���غϼ�") && (mat.Title.Contains("����") || mat.Title.Contains("���û�") || mat.Title.Contains("ͬʱ��")))
                    {
                        if (mat.Title.Contains("����"))
                        {
                            matcgui = mat;
                        }
                        else
                        if (mat.Title.Contains("���û�"))
                        {
                            matdyh = mat;
                        }
                        else
                            if (mat.Title.Contains("ͬʱ��"))
                            {
                                mattsl = mat;
                            }
                    if (!mat.Title.Contains("ͬʱ��"))
                        continue;
                    }
                    if (mat.Title == "ͬʱ��")
                        value2 = value2 * Math.Round(Convert.ToDouble( mat.GetType().GetProperty("y" + i.ToString()).GetValue(mat, null)),2);
                    else
                        value2 += Math.Round(Convert.ToDouble(mat.GetType().GetProperty("y" + i.ToString()).GetValue(mat, null)), 2);

                }
                value += value2;
                psp_TypePan.GetType().GetProperty("y" + i.ToString()).SetValue(psp_TypePan, value, null);
                Common.Services.BaseService.Update<Ps_Forecast_Math>(psp_TypePan);
            }
            if (psp_TypePan.ParentID != "")
            {
                psp_TypePan = Common.Services.BaseService.GetOneByKey<Ps_Forecast_Math>(psp_TypePan.ParentID);
                updateAllPan(psp_TypePan, listReports);
            }
            else
                if (psp_TypePan.Title.Contains("���غϼ�"))
                {
                    value = 0;
                    value2 = 0;
                    for (int i = listReports.StartYear; i <= listReports.EndYear; i++)
                    {
                        value2 =  Math.Round(Convert.ToDouble(mattsl.GetType().GetProperty("y" + i.ToString()).GetValue(mattsl, null)),2);
                        if ( psp_TypePan.Forecast==3)
                        {
                            if(value2 != 0 )
                            {
                            value2=Math.Round(Convert.ToDouble(psp_TypePan.GetType().GetProperty("y" + i.ToString()).GetValue(psp_TypePan, null)),2)/value2;

                             value=value2-Math.Round(Convert.ToDouble(matdyh.GetType().GetProperty("y" + i.ToString()).GetValue(matdyh, null)),2);
                            matcgui.GetType().GetProperty("y" + i.ToString()).SetValue(matcgui, value, null);
                                 Common.Services.BaseService.Update<Ps_Forecast_Math>(matcgui);
                            }

                        }
                        else
                            if (psp_TypePan.Forecast == 2)
                            {
                                value2 =Math.Round(Convert.ToDouble(psp_TypePan.GetType().GetProperty("y" + i.ToString()).GetValue(psp_TypePan, null)),2 );
                                value = value2 -Math.Round( Convert.ToDouble(matdyh.GetType().GetProperty("y" + i.ToString()).GetValue(matdyh, null)),2);
                                matcgui.GetType().GetProperty("y" + i.ToString()).SetValue(matcgui, value, null);
                                Common.Services.BaseService.Update<Ps_Forecast_Math>(matcgui);

                            }

                    }

                }
        }
Example #12
0
        public void BadForecast(int type, Ps_forecast_list forecastReport)
        {
            Ps_Forecast_Math psp_Type = new Ps_Forecast_Math();
            psp_Type.ForecastID = forecastReport.ID;
            psp_Type.Forecast = type;
            Common.Services.BaseService.Update("DeletePs_Forecast_MathForecastIDAndForecast", psp_Type);
            psp_Type.Forecast = 0;
            IList listTypes = Common.Services.BaseService.GetList("SelectPs_Forecast_MathByForecastIDAndForecast", psp_Type);
            foreach (Ps_Forecast_Math psp_Typetemp in listTypes)
            {
                string id = psp_Typetemp.ID;
                psp_Type = new Ps_Forecast_Math();
                psp_Type = psp_Typetemp;
                psp_Type.ID = type + "|" + id;// Guid.NewGuid().ToString();
                psp_Type.Forecast = type;
                psp_Type.Col1 = id;
                psp_Type.ParentID = type + "|" + psp_Typetemp.ParentID;

                Ps_BadData pb1 = new Ps_BadData();
                pb1.ForecastID = psp_Typetemp.ForecastID;
                pb1.Forecast = 1;
                pb1.Col1 = id;
                Ps_BadData pb = new Ps_BadData();
                IList<Ps_BadData> li = Common.Services.BaseService.GetList<Ps_BadData>("SelectPs_BadDataByCol1", pb1);
                if (li.Count > 0)
                {
                    pb = li[0];
                    for(int i=forecastReport.StartYear;i<forecastReport.EndYear;i++)
                    {
                        double dl = 0;
                        double dl1 = 0;
                        PropertyInfo pi = psp_Type.GetType().GetProperty("y" + i);
                        PropertyInfo pi1 = pb.GetType().GetProperty("y" + i);
                            try
                            {

                                dl = Convert.ToDouble(pi.GetValue(psp_Type, null));
                            }
                        catch(Exception ex)
                            {
                                int b = 1;
                                b++;
                        }
                        try
                        {

                            dl1 = Convert.ToDouble(pi1.GetValue(pb, null));

                        }
                        catch (Exception ex)
                        {
                            int b = 1;
                            b++;
                        }

                        if(dl1!=0)
                            pi.SetValue(psp_Type, dl + dl1, null);

                    }
                }

                Common.Services.BaseService.Create<Ps_Forecast_Math>(psp_Type);
            }
        }
Example #13
0
        /// <summary>
        /// 查找算法模型
        /// </summary>
        /// <param name="forecastReport">Ps_forecast_list对象</param>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public IList<Ps_Calc> SelectedForecastList(int type, Ps_forecast_list forecastReport)
        {
            IList<Ps_Calc> _CalcList = new List<Ps_Calc>();
            //string sql = " Forecast = '" +forecastReport.ID+"' and Forecast = '"+ type +
            //        "' and Col4 != ''";

            if(type != null && forecastReport != null)
            {
                Ps_Calc pcs = new Ps_Calc();
                pcs.Forecast = type;
                pcs.ForecastID = forecastReport.ID;

                _CalcList = Services.BaseService.GetList<Ps_Calc>("SelectPs_CalcOfCol4", pcs);
                return _CalcList;
            }
            else
            {
                return _CalcList;
            }
        }
Example #14
0
 public FormExpert(Ps_forecast_list fr)
 {
     forecastReport = fr;
     InitializeComponent();
 }
Example #15
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "")
            {
                MsgBox.Show("��ѡ��Ԥ�����ƣ�");
                return;
            }

            if(_isEdit)//�޸�
            {

            }
            else//�½�
            {
                psp_ForecastReport = new Ps_forecast_list();
                psp_ForecastReport.ID = Guid.NewGuid().ToString().Substring(36 - 12);
                psp_ForecastReport.Col1 = TypeFlag.ToString();
            }
            psp_ForecastReport.Title = comboBox1.Text;
            psp_ForecastReport.StartYear = (int)spinEdit1.Value;
            psp_ForecastReport.EndYear = (int)spinEdit2.Value;
            psp_ForecastReport.UserID = projectUID;

              //  System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();

              //  string LoginUser = configurationAppSettings.GetValue("lastLoginUserNumber", typeof(string)).ToString();
              //  psp_ForecastReport.UserID = LoginUser;

              ////  System.Configuration.ConfigurationSettings appreader = new System.Configuration.ConfigurationSettings();
              //  LoginUser = System.Configuration.ConfigurationSettings.AppSettings["lastLoginUserNumber"];

            // LoginUser = SetCfgValue("lastLoginUserNumber", Application.ExecutablePath + ".config");

            psp_ForecastReport.UserID = projectUID; ////LoginUser;

            //if (checkBox1.Checked)
            //    psp_ForecastReport.Col1 = "1";
            //else
            //    psp_ForecastReport.Col1 = "0";

             //       psp_ForecastReport.HistoryYears = (int)spinEdit3.Value;

            if (psp_ForecastReport.EndYear < psp_ForecastReport.StartYear + 1)
            {
                MsgBox.Show("�������Ӧ�ô�����ʼ�������1�꣡");
                return;
            }

            if (_isEdit)
            {
                try
                {
                    Common.Services.BaseService.Update<Ps_forecast_list>(psp_ForecastReport);
                }
                catch
                {
                    MsgBox.Show("�޸�Ԥ������");
                    return;
                }
            }
            else
            {
                try
                {
                   Common.Services.BaseService.Create<Ps_forecast_list>(psp_ForecastReport);
                }
                catch
                {
                    MsgBox.Show("�½�Ԥ������");
                    return;
                }
            }

            DialogResult = DialogResult.OK;
        }
 private void SetYear(Ps_forecast_list pfl)
 {
     if (IsFirst)
     {
         startyear = pfl.StartYear;
         endyear = pfl.YcEndYear;
         IsFirst = false;
     }
     else
     {
         if (pfl.StartYear<startyear)
         {
             startyear = pfl.StartYear;
         }
         if (pfl.YcEndYear>endyear)
         {
             endyear = pfl.YcEndYear;
         }
     }
 }
        private void ShowModel(int id, Ps_forecast_list report)
        {
            switch (id)
            {
                case 1:
                    FormAverageGrowthRateSH FMA1 = new FormAverageGrowthRateSH(report);
                    FMA1.CanEdit = CnaEdit;
                    FMA1.Text = this.Text + "- 年增长率法";
                    FMA1.ShowDialog();
                    break;
                case 2:
                    FormExtrapolationMethodSH FMA2 = new FormExtrapolationMethodSH(report);
                    FMA2.Text = this.Text + "- 外推法";
                    FMA2.CanEdit = CnaEdit;
                    FMA2.ShowDialog();
                    break;

                case 3:
                    FormCoefficientOfElasticitySH FMA3 = new FormCoefficientOfElasticitySH(report);
                    FMA3.Text = this.Text + "- 弹性系数法";
                    FMA3.CanEdit = CnaEdit;
                    FMA3.ShowDialog();
                    break;
                case 4:
                    FormExponentialSmoothingSH FMA4 = new FormExponentialSmoothingSH(report);
                    FMA4.Text = this.Text + "- 指数平滑法";
                    FMA4.CanEdit = CnaEdit;
                    FMA4.ShowDialog();
                    break;
                case 5:
                    GrayModelSH FMA5 = new GrayModelSH(report);
                    FMA5.Text = this.Text + "- 灰色理论法";
                    FMA5.CanEdit = CnaEdit;
                    FMA5.ShowDialog();
                    break;
                case 6:
                    FormForecast11_FSH FMA6 = new FormForecast11_FSH(report);
                    FMA6.Text = this.Text + "- 大用户";
                    FMA6.CanEdit = CnaEdit;
                    FMA6.ShowDialog();
                    break;
                case 7:
                    FormMaxHourSH FMA7 = new FormMaxHourSH(report);
                    FMA7.Text = this.Text + "- 负荷最大利用小时数法";
                    FMA7.CanEdit = CnaEdit;
                    FMA7.ShowDialog();
                    break;
                case 8:
                    FormForecast9SH FMA8 = new FormForecast9SH(report);
                    FMA8.Text = this.Text + "- 复合算法";
                    FMA8.CanEdit = CnaEdit;
                    FMA8.ShowDialog();
                    break;
                case 10:
                    FormExpertSH FMA10 = new FormExpertSH(report);
                    FMA10.Text = this.Text + "- 专家决策法";
                    FMA10.CanEdit = CnaEdit;
                    FMA10.ShowDialog();
                    break;
            }
        }
 public FormUnitConsumptionValue(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
Example #19
0
 public FormForecast5(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
 public FormExponentialSmoothing(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
Example #21
0
        private void FormForecastReport_Load(object sender, EventArgs e)
        {
            Ps_forecast_list report = new Ps_forecast_list();
            report.UserID = MIS.ProgUID;
            report.Col1 = "1";
            IList listReports = Common.Services.BaseService.GetList("SelectPs_forecast_listByCOL1AndUserID", report);

            for (int i = 0; i < listReports.Count;i++ )
            {
                comboBox1.Items.Add(((Ps_forecast_list)listReports[i]).Title);
            }

            LoginUser = projectUID;// SetCfgValue("lastLoginUserNumber", Application.ExecutablePath + ".config");
            if(IsEdit)
            {
                comboBox1.Text = psp_ForecastReport.Title;
                spinEdit1.Value = psp_ForecastReport.StartYear;
                spinEdit2.Value = psp_ForecastReport.EndYear;

                //////if (psp_ForecastReport.Col1 == "1")
                //////{
                //////    checkBox1.Checked = true;
                //////}
                //////else
                //////{
                //////    checkBox1.Checked = false;

                //////}
                //////if (LoginUser == psp_ForecastReport.UserID)
                //////{
                //////    checkBox1.Visible = true;
                //////}
                //////else
                //////{
                //////    checkBox1.Visible = false;
                //////}

              //  spinEdit3.Value = psp_ForecastReport.HistoryYears;
            }
            else
            {
                //////checkBox1.Checked = true;
                spinEdit1.Value = DateTime.Now.Year;
                spinEdit2.Value = DateTime.Now.Year + 10;
                //comboBox1.Text = "������" + spinEdit1.Value + "��" + spinEdit2.Value + "����" + _typeText + "Ԥ����������";
            }

            //if(_noHistoryYears)
            //{
            //    label4.Visible = spinEdit3.Visible = false;
            //    simpleButton1.Location = new Point(simpleButton1.Location.X, simpleButton1.Location.Y - 60);
            //    simpleButton2.Location = new Point(simpleButton2.Location.X, simpleButton2.Location.Y - 60);
            //    this.Height -= 60;
            //    if (!IsEdit)
            //    {
            //        spinEdit2.Value = DateTime.Now.Year + 5;
            //        textEdit1.Text = "������" + spinEdit1.Value.ToString() + "��/" + spinEdit2.Value.ToString() + "���긺������Ԥ���";
            //    }
            //}
        }
 public FormCoefficientOfElasticity(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
        private void InitData()
        {
            Ps_forecast_list report = new Ps_forecast_list();
            report.UserID = ProjectUID;
            report.Col1 =typeflag.ToString();
            IList<Ps_forecast_list> listReports = Common.Services.BaseService.GetList<Ps_forecast_list>("SelectPs_forecast_listByCOL1AndUserID", report);

            gridControl1.DataSource = listReports;

            //DataTable dataTable = Itop.Common.DataConverter.ToDataTable(listReports, typeof(Ps_forecast_list));
            //gridView1.BeginUpdate();
            //gridControl1.DataSource = dataTable;

            //gridView1.Columns["ID"].Visible = false;
            //gridView1.Columns["ID"].OptionsColumn.ShowInCustomizationForm = false;
            //gridView1.Columns["UserID"].Visible = false;
            //gridView1.Columns["UserID"].OptionsColumn.ShowInCustomizationForm = false;
            //gridView1.Columns["Col1"].Visible = false;
            //gridView1.Columns["Col1"].OptionsColumn.ShowInCustomizationForm = false;
            //gridView1.Columns["Col2"].Visible = false;
            //gridView1.Columns["Col2"].OptionsColumn.ShowInCustomizationForm = false;

            //gridView1.Columns["Title"].Caption = "Ԥ������";
            //gridView1.Columns["Title"].Width = 300;
            //gridView1.Columns["StartYear"].Caption = "��ʼ���";
            //gridView1.Columns["StartYear"].Visible = false;
            //gridView1.Columns["EndYear"].Caption = "�������";
            //gridView1.Columns["EndYear"].Visible = false;
            //gridView1.EndUpdate();
        }
        private void InitData()
        {
            Ps_forecast_list report = new Ps_forecast_list();
            report.UserID = ProjectUID;
            report.Col1 =typeflag.ToString();
            IList<Ps_forecast_list> listReports = Common.Services.BaseService.GetList<Ps_forecast_list>("SelectPs_forecast_listByCOL1AndUserID", report);

            gridControl1.DataSource = listReports;
        }
 public FormForecastMaxOrBad_SH(Ps_forecast_list fr)
 {
     forecastReport = fr;
     InitializeComponent();
 }
Example #26
0
        private void ShowModel(int id,Ps_forecast_list report)
        {
            switch (id)
            {
                case 1:
                    FormAverageGrowthRateSH FMA1 = new FormAverageGrowthRateSH(report);
                    FMA1.CanEdit = base.EditRight;
                    FMA1.Text = this.Text + "- 年增长率法";
                    FMA1.ShowDialog();
                    break;
                case 2:
                    FormExtrapolationMethodSH FMA2 = new FormExtrapolationMethodSH(report);
                    FMA2.Text = this.Text + "- 外推法";
                    FMA2.CanEdit = base.EditRight;
                    FMA2.ShowDialog();
                    break;

                case 3:
                    FormCoefficientOfElasticitySH FMA3 = new FormCoefficientOfElasticitySH(report);
                    FMA3.Text = this.Text + "- 弹性系数法";
                    FMA3.CanEdit = base.EditRight;
                    FMA3.ShowDialog();
                    break;
                case 4:
                    FormExponentialSmoothingSH FMA4 = new FormExponentialSmoothingSH(report);
                    FMA4.Text = this.Text + "- 指数平滑法";
                    FMA4.CanEdit = base.EditRight;
                    FMA4.ShowDialog();
                    break;
                case 5:
                    GrayModelSH FMA5 = new GrayModelSH(report);
                    FMA5.Text = this.Text + "- 灰色理论法";
                    FMA5.CanEdit = base.EditRight;
                    FMA5.ShowDialog();
                    break;
                case 6:
                    FormForecast11_DSH FMA6 = new FormForecast11_DSH(report);
                    FMA6.Text = this.Text + "- 大用户";
                    FMA6.CanEdit = base.EditRight;
                    FMA6.ShowDialog();
                    break;
                case 7:
                    FormUnitConsumptionValueSH FMA7 = new FormUnitConsumptionValueSH(report);
                    FMA7.Text = this.Text + "- 产值单耗法";
                    FMA7.CanEdit = base.EditRight;
                    FMA7.ShowDialog();
                    break;
                case 8:
                    FormForecast9SH FMA8 = new FormForecast9SH(report);
                    FMA8.Text = this.Text + "- 复合算法";
                    FMA8.CanEdit = base.EditRight;
                    FMA8.ShowDialog();
                    break;
                case 9:
                    FormForecastDResult FMA9 = new FormForecastDResult(report);
                    FMA9.Text = this.Text + "- 预测结果列表和综合";
                    FMA9.CanEdit = base.EditRight;
                    FMA9.ShowDialog();
                    break;
                case 10:
                    FormExpertSH FMA10 = new FormExpertSH(report);
                    FMA10.Text = this.Text + "- 专家决策法";
                    FMA10.CanEdit = base.EditRight;
                    FMA10.ShowDialog();
                    break;
            }
        }
Example #27
0
 /// <summary>
 /// 初始化commboBox
 /// </summary>
 /// <param name="_comboBox"></param>
 /// <param name="forecastReport"></param>
 /// <param name="nOwn">判断算法是否为相关法 =2还是外推法=1,0代表父算法</param>
 public void InitCommboBoxSH(System.Windows.Forms.ComboBox _comboBox, Ps_forecast_list forecastReport, int nOwn)
 {
     if (_comboBox.Name == "comboBox2")
     {
         if (nOwn == 0)
         {
             InitScenario();
             for (int i = 0; i < _nComboBoxCount; ++i)
             {
                 _comboBox.Items.Add(_StrScenario[i]);
             }
         }
     }
     else if (_comboBox.Name == "comboBox6")
     {
         if (nOwn == 1)
         {
             InitSubalgorithm();
             for (int i = 0; i < _nComboBoxCount_Subalgorithm; ++i)
             {
                 _comboBox.Items.Add(_StrSubalgorithm[i]);
             }
         }
         else if (nOwn == 2)
         {
             InitInterfix();
             for (int i = 0; i < _nComboBoxCount_Interfix; ++i)
             {
                 _comboBox.Items.Add(_StrInterfix[i]);
             }
         }
     }
     else
     {
         if (forecastReport != null)
         {
             for (int i = forecastReport.StartYear; i <= forecastReport.YcEndYear; i++)
             {
                 _comboBox.Items.Add(i + "年");
             }
         }
     }
 }
 public FormExtrapolationMethod(Ps_forecast_list fr)
 {
     InitializeComponent();
     forecastReport = fr;
     Text = fr.Title;
 }
Example #29
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (textEdit1.Text == string.Empty)
            {
                MsgBox.Show("������Ԥ�����ƣ�");
                return;
            }

            if (_isEdit)//�޸�
            {

            }
            else//�½�
            {
                psp_ForecastReport = new Ps_forecast_list();
                psp_ForecastReport.ID = Guid.NewGuid().ToString();
                psp_ForecastReport.Col1 = TypeFlag.ToString();
            }
            psp_ForecastReport.Title = textEdit1.Text;
            psp_ForecastReport.StartYear = (int)spinEdit1.Value;
            psp_ForecastReport.EndYear = (int)spinEdit2.Value;
            psp_ForecastReport.UserID = projectUID;

            if (psp_ForecastReport.EndYear < psp_ForecastReport.StartYear + 1)
            {
                MsgBox.Show("�������Ӧ�ô�����ʼ�������1�꣡");
                return;
            }

            if (_isEdit)
            {
                try
                {
                    Common.Services.BaseService.Update<Ps_forecast_list>(psp_ForecastReport);
                }
                catch
                {
                    MsgBox.Show("�޸�Ԥ������");
                    return;
                }
            }
            else
            {
                try
                {
                    Common.Services.BaseService.Create<Ps_forecast_list>(psp_ForecastReport);
                }
                catch
                {
                    MsgBox.Show("�½�Ԥ������");
                    return;
                }
            }

            DialogResult = DialogResult.OK;
        }
Example #30
0
 private void FrmGYDWGH_Load(object sender, EventArgs e)
 {
     //根据窗口变化全部添满
     fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
     //选择预测方案
     FrmSelforcast fs = new FrmSelforcast();
     if (fs.ShowDialog()==DialogResult.OK)
     {
         forecastReport = fs.report;
     }
     //添加表
     fpSpread1_addsheet();
 }