コード例 #1
0
        public void BatchSavePictures(string pjnd, List <AssetsData> lstAssetsData, Size size)
        {
            DecParams      decParams      = new DecParams();
            PictureCreator pictureCreator = new PictureCreator();

            foreach (AssetsData item in lstAssetsData)
            {
                decParams.ProID = item.ProID;
                //decParams.Pjnd = item.Pjnd;
                decParams.Dydm = item.DYDM;
                decParams.Dymc = item.DYMC;
                //decParams.Ycqsrq = item.

                EvaluationOptionsService evalOptionService = new EvaluationOptionsService();
                DataTable dtEvalOption = evalOptionService.GetDataTable(item.ProID, item.Pjnd, item.DYDM);
                if (dtEvalOption == null || dtEvalOption.Rows.Count <= 0)
                {
                    continue;
                }
                string ycqsrq = dtEvalOption.Rows[0]["startNy"].ToString();
                decParams.PreStartDate = ycqsrq.ToDateTime();

                Bitmap bmp = pictureCreator.CreateBitmap(decParams, size);
                bmp.Save(@"e:\\" + decParams.Dymc + ".png");
            }
        }
コード例 #2
0
        public void InitFrom(DecParams decParams, List <AssetsData> lstAssetsData, IEntityData entityData)
        {
            if (this.decParams != decParams)
            {
                this.decParams = decParams;
            }
            if (this.lstAssetsData != lstAssetsData)
            {
                this.lstAssetsData = lstAssetsData;
            }
            if (this.entityData != entityData)
            {
                this.entityData = entityData;
            }
            this.Text = entityData.Text + "预测产量";

            if (entityData != lstAssetsData[0])
            {
                this.tsbSave.Visible = false;
                this.treeHeadDataGridView1.ReadOnly = true;
            }
            else
            {
                this.tsbSave.Visible = true;
                this.treeHeadDataGridView1.ReadOnly = false;
            }
            unitType = UnitType.CnUnit;
            InitUnit(UnitType.CnUnit);
        }
コード例 #3
0
ファイル: Form9.cs プロジェクト: Huitingorg/Huiting
        private void button1_Click(object sender, EventArgs e)
        {
            string chartTemplateFile = "DYTemplate.xml";
            string seriesOptionsFile = "DYSeriesOptions.xml";

            chartTemplateFile = PublicMethods.GetAbsolutePath(chartTemplateFile);
            seriesOptionsFile = PublicMethods.GetAbsolutePath(seriesOptionsFile);

            DecParams decParams = new DecParams();

            decParams.ProID        = "ff2e59ed-76e7-489f-91ed-85e57cd6cc24";
            decParams.PreStartDate = new DateTime(2014, 11, 1);
            DataTable dt = new DYMonthDataService().GetDataTable("2201002", decParams.PreStartDate.ToString("yyyyMM"));

            uctChart1.LoadChart(chartTemplateFile, seriesOptionsFile, dt, decParams);
        }
コード例 #4
0
        private void btnReadXml_Click(object sender, EventArgs e)
        {
            try
            {
                //获取模板
                DrawChart drawChart = new DrawChart();
                drawChart.ReadTemplateFile(fileName);

                DecParams decParams = new DecParams();
                decParams.ProID        = "ff2e59ed-76e7-489f-91ed-85e57cd6cc24";
                decParams.PreStartDate = new DateTime(2014, 11, 1);
                DataTable dt = new DYMonthDataService().GetDataTable("2201002", decParams.PreStartDate.ToString("yyyyMM"));
                drawChart.Init(dt, decParams, "单元名称");
                bdChart1.LoadTemplateAndData(drawChart);
            }
            catch (Exception ex)
            {
                PublicMethods.WarnMessageBox("失败:" + ex.Message);
            }
        }
コード例 #5
0
ファイル: DYChartWindow.cs プロジェクト: Huitingorg/Huiting
        public void Init(DecParams decParams)
        {
            Log.Info("开始初始化DYChartWindow...");
            if (uctChart1.Visible == false)
            {
                uctChart1.Visible = true;
            }

            ResFormulaService    resFormulaService = new ResFormulaService();
            DataTable            dtDyKFSJ          = resFormulaService.GetDYMonthDataTable(decParams.Dydm, decParams.Ycqsrq);
            VertAxisStateService vass            = new VertAxisStateService();
            DataTable            dtVertAxisState = vass.GetDataTable(decParams.ProID, decParams.Pjnd, decParams.Dydm, StudyType.DYFX);

            this.uctChart1.LoadChart(GlobalInfo.DYTemplate, GlobalInfo.DYSeriesOptions, GlobalInfo.DYBDTemplate, dtDyKFSJ, dtVertAxisState, decParams, StudyType.DYFX, null);
            uctChart1_RefreshUctDecLine(null, null);
            //有可能要刷新网格
            this.RefreshDataGridView();
            this.RefreshBDChart();

            Log.Info("结束初始化DYChartWindow...");
        }
コード例 #6
0
ファイル: DYChartWindow.cs プロジェクト: Huitingorg/Huiting
        void uctChart1_SetBiaoDingVisible(object sender, EventArgs e)
        {
            string pjndDeleted = sender as string;

            if (string.IsNullOrEmpty(pjndDeleted))
            {
                return;
            }

            //从图形上删除1条标定信息
            List <string> lstNeedDelPjnd = new List <string>()
            {
                pjndDeleted
            };

            uctChart1.RemoveLstBiaoDing(lstNeedDelPjnd);
            //从数据表中删除一条记录
            DecParams             decParams = this.uctChart1.decParams;
            BiaoDingStatusService bdss      = new BiaoDingStatusService();

            bdss.Update(decParams.ProID, decParams.Pjnd, decParams.Dydm, pjndDeleted);
        }