コード例 #1
0
ファイル: Frm220ResultWH.cs プロジェクト: EdgarEDT/myitoppsp
        //统计
        private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormChooseYears frm = new FormChooseYears();
            for (int i = yAnge.StartYear; i <= yAnge.FinishYear; i++)
            {
                frm.ListYearsForChoose.Add(i);

            }
            frm.NoIncreaseRate = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                string con = "ProjectID='" + GetProjectID + "' ORDER BY Sort";
                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_220ResultByConn", con);
                  AddTotalRow(ref listTypes);

                DataTable dt = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_220Result));

                FrmResultPrint frma = new FrmResultPrint();
                frma.IsSelect = _isSelect;
                frma.Text = "220千伏电力平衡结果表";
                frma.Dw1 = "单位:万千瓦";
                treeList1.DataSource = dt;
                frma.GridDataTable = ResultDataTable(ConvertTreeListToDataTable(treeList1,false), frm.ListChoosedYears);

                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_220ResultByConn", con);
                DataTable dt1 = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_220Result));
                treeList1.DataSource = dt1;
              //  SetValueNull();
                //treeList1.ExpandAll();
                frma.YearList = frm.ListChoosedYears;
                if (frma.ShowDialog() == DialogResult.OK && _isSelect)
                {
                    //gcontrol = frm.gridControl1;
                    //title = frm.Title;
                    //unit = "单位:万元";
                    DialogResult = DialogResult.OK;
                }

            }
        }
コード例 #2
0
ファイル: FrmTzgs.cs プロジェクト: EdgarEDT/myitoppsp
        //统计
        private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //FormChooseYears frm = new FormChooseYears();
            //for (int i = yAnge.StartYear; i <= yAnge.FinishYear; i++)
            //{
            //    frm.ListYearsForChoose.Add(i);

            //}
            //frm.NoIncreaseRate = true;

            //if (frm.ShowDialog() == DialogResult.OK)
            //{
                string con = "ProjectID='" + GetProjectID + "' ORDER BY Sort";
                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_TZGSByConn", con);

                CalcYearVol();
                AddTotalRow(ref listTypes);
                DataTable dt = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_TZGS));

                FrmResultPrint frma = new FrmResultPrint();
                IList<string> strTe = new List<string>();

                for (int k = yAnge.StartYear + 1; k <= yAnge.StartYear + 5; k++)
                    strTe.Add(k.ToString());
                frma.YearList1 = strTe;
                frma.IsSelect = _isSelect;
                frma.Text = "电网建设项目投资估算表";
                frma.Dw1 = "单位:千米、万千伏安、万元";
                treeList1.DataSource = dt;
                frma.bTzgs = true;
                frma.IsBand = false;
                frma.GridDataTable = ResultDataTable(ConvertTreeListToDataTable(treeList1, false), strTe);

                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_TZGSByConn", con);

                CalcYearVol();
            DataTable dt1 = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_TZGS));
                treeList1.DataSource = dt1;
              //  SetValueNull();
                //treeList1.ExpandAll();
                if (frma.ShowDialog() == DialogResult.OK)
                {
                    //gcontrol = frm.gridControl1;
                    //title = frm.Title;
                    //unit = "单位:万元";
                    DialogResult = DialogResult.OK;
                }

              //  }
        }
コード例 #3
0
ファイル: Frm220ResultSH.cs プロジェクト: EdgarEDT/myitoppsp
        //导出数据
        private void barButtonItem4_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormChooseYears frm = new FormChooseYears();
            for (int i = yAnge.StartYear; i <= yAnge.FinishYear; i++)
            {
                frm.ListYearsForChoose.Add(i);

            }
            frm.NoIncreaseRate = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                FrmResultPrint frma = new FrmResultPrint();
                frma.IsSelect = _isSelect;
                frma.Text = "220千伏供电平衡表";
                frma.Dw1 = "单位:万千瓦";

                frma.GridDataTable = ResultDataTable(ConvertTreeListToDataTable(treeList1, false), frm.ListChoosedYears);

                frma.YearList = frm.ListChoosedYears;
                if (frma.ShowDialog() == DialogResult.OK && _isSelect)
                {
                    DialogResult = DialogResult.OK;
                }

            }
        }
コード例 #4
0
ファイル: FrmTzgsWH1.cs プロジェクト: EdgarEDT/myitoppsp
        //统计
        private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //FormChooseYears frm = new FormChooseYears();
            //for (int i = yAnge.StartYear; i <= yAnge.FinishYear; i++)
            //{
            //    frm.ListYearsForChoose.Add(i);

            //}
            //frm.NoIncreaseRate = true;

            //if (frm.ShowDialog() == DialogResult.OK)
            //{
            //string con = tong + "ProjectID='" + GetProjectID + "' ORDER BY Sort";

            string con =  "ProjectID='" + GetProjectID + "' ORDER BY Sort";
                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_TZGSByConn", con);

                CalcYearVol();
                AddTotalRow(ref listTypes);
                DataTable dt = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_TZGS));

                FrmResultPrint frma = new FrmResultPrint();
                IList<string> strTe = new List<string>();
                if (xtraTabControl1.SelectedTabPageIndex == 0)
                    frma.Line = true;
                else
                    frma.Line = false;
                for (int k = yAnge.StartYear + 1; k <= yAnge.StartYear + 5; k++)
                    strTe.Add(k.ToString());
                frma.YearList1 = strTe;
                frma.IsSelect = _isSelect;
                frma.Text = "电网建设项目投资估算表";
                frma.Dw1 = "单位:千米、万千伏安、万元";
                treeList1.DataSource = dt;
                frma.bTzgs = true;
                frma.IsBand = false;
                frma.GridDataTable = ResultDataTable(ConvertTreeListToDataTable(treeList1, false), strTe);

                listTypes = Common.Services.BaseService.GetList("SelectPs_Table_TZGSByConn", con);

                CalcYearVol();
            DataTable dt1 = Itop.Common.DataConverter.ToDataTable(listTypes, typeof(Ps_Table_TZGS));

              //  SetValueNull();
                //treeList1.ExpandAll();
                //if (== DialogResult.OK)
                //{
                //    //gcontrol = frm.gridControl1;
                //    //title = frm.Title;
                //    //unit = "单位:万元";
                //    DialogResult = DialogResult.OK;
                //}
                frma.ShowDialog();
                //Application.DoEvents();
                //this.Cursor = Cursors.WaitCursor;
                //treeList1.BeginUpdate();
                //LoadData();
                //treeList1.EndUpdate();
                //this.Cursor = Cursors.Default;
                //if (!base.AddRight)
                //{
                //    barButtonItem1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                //}

                treeList1.DataSource = dataTable;

              //  }
        }