예제 #1
0
        private void barButtonItem5_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.ctrlPowerEachList1.FocusedObject == null)
            {
                return;
            }
            FormClass fc = new FormClass();

            gridControl1.DataSource                   = fc.ConvertTreeListToDataTable(treeList1);
            gridView1.Columns["Title"].Caption        = "项目名称";
            gridView1.Columns["Title"].VisibleIndex   = 0;
            gridView1.Columns["Jingtai"].Caption      = "静态总投资";
            gridView1.Columns["Jingtai"].VisibleIndex = 5000;
            gridView1.Columns["Lixi"].Caption         = "建设期间代款利息";
            gridView1.Columns["Lixi"].Width           = 120;
            gridView1.Columns["Lixi"].VisibleIndex    = 5000;
            gridView1.Columns["Yubei"].Caption        = "价格预备费";
            gridView1.Columns["Yubei"].VisibleIndex   = 5000;
            gridView1.Columns["Dongtai"].Caption      = "动态投资";
            gridView1.Columns["Dongtai"].VisibleIndex = 5000;
            gridView1.Columns["Flag"].Visible         = false;
            gridView1.Columns["Flag2"].Visible        = false;
            title = this.ctrlPowerEachList1.FocusedObject.ListName;
            FileClass.ExportExcel(gridControl1);
        }
예제 #2
0
 private void barButtonItem15_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.ctrlPowerEachList1.FocusedObject == null)
         return;
     FormClass fc = new FormClass();
     gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);
 }
예제 #3
0
        private void barButtonItem15_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.ctrlPowerEachList11.FocusedObject == null)
                return;
            FormClass fc = new FormClass();
            gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);

            //for (int i = 0; i < gridView1.Columns.Count; i++)
            //{
            //    if (gridView1.Columns[i].Caption.IndexOf("自定义列") >= 0)
            //    {
            //        gridView1.Columns[i].Caption = gridView1.Columns[i].Caption.Substring(0, gridView1.Columns[i].Caption.Length - 4);
            //    }
            //}
            gridView1.Columns["Title"].Caption = "城区名称";
            gridView1.Columns["Title"].VisibleIndex = 0;
            gridView1.Columns["Code"].Caption = "项目名称";
            gridView1.Columns["Code"].VisibleIndex = 800;

            gridView1.Columns["L4"].Caption = "建设性质";
            gridView1.Columns["L4"].VisibleIndex = 801;
            gridView1.Columns["IsConn"].Caption = "变电容量(MVA)";
            gridView1.Columns["IsConn"].VisibleIndex = 802;
            gridView1.Columns["Remark"].Caption = "线路长度(KM)";
            gridView1.Columns["Remark"].VisibleIndex = 803;

            gridView1.Columns["L5"].Caption = "投产年限";
            gridView1.Columns["L5"].VisibleIndex = 804;
            gridView1.Columns["L6"].Caption = "总投资(万元)";
            gridView1.Columns["L6"].VisibleIndex = 805;

            gridView1.Columns["StartYear"].Visible = false;
            gridView1.Columns["EndYear"].Visible = false;
            gridView1.Columns["L2"].Visible = false;
            gridView1.Columns["ParentID"].Visible = false;

            gridView1.Columns["L1"].Visible = false;
            gridView1.Columns["Flag"].Visible = false;
            gridView1.Columns["Flag2"].Visible = false;
            gridView1.Columns["CreateTime"].Visible = false;
            gridView1.Columns["UpdateTime"].Visible = false;
            gridView1.Columns["L3"].Visible = false;
            title = this.ctrlPowerEachList11.FocusedObject.ListName;
            FileClass.ExportExcel("111222","",gridControl1);
        }
예제 #4
0
 public void InitGrid()
 {
     FormClass fc = new FormClass();
     gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);
 }
예제 #5
0
 private void barButtonItem5_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.ctrlPowerEachList1.FocusedObject == null)
         return;
     FormClass fc = new FormClass();
     gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);
     gridView1.Columns["Title"].Caption = "项目名称";
     gridView1.Columns["Title"].VisibleIndex = 0;
     gridView1.Columns["JianSheXingZhi"].Caption = "建设性质";
     gridView1.Columns["RongLiang"].Caption = "变电容量";
     gridView1.Columns["ChangDu"].Caption = "线路长度";
     gridView1.Columns["TouZiZongEr"].Caption = "总投资(万元)";
     gridView1.Columns["CreatTime"].Visible = false;
     gridView1.Columns["Flag"].Visible = false;
     gridView1.Columns["Flag2"].Visible = false;
     title = this.ctrlPowerEachList1.FocusedObject.ListName;
     FileClass.ExportExcel(gridControl1);
 }
예제 #6
0
        public void InitGrid()
        {
            FormClass fc = new FormClass();

            gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);
        }
예제 #7
0
파일: Form9.cs 프로젝트: EdgarEDT/myitoppsp
        private void barButtonItem15_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.ctrlPowerEachList1.FocusedObject == null)
                return;
            FormClass fc = new FormClass();
            gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);

            //for (int i = 0; i < gridView1.Columns.Count; i++)
            //{
            //    if (gridView1.Columns[i].Caption.IndexOf("自定义列") >= 0)
            //    {
            //        gridView1.Columns[i].Caption = gridView1.Columns[i].Caption.Substring(0, gridView1.Columns[i].Caption.Length - 4);
            //    }
            //}
            gridView1.Columns["Title"].Caption = "项目名称";
            gridView1.Columns["Title"].VisibleIndex = 0;
            gridView1.Columns["StartYear"].Caption = "计划开工时间";
            gridView1.Columns["StartYear"].VisibleIndex = 760;
            gridView1.Columns["EndYear"].Caption = "计划结束时间";
            gridView1.Columns["EndYear"].Width = 100;
            gridView1.Columns["EndYear"].VisibleIndex = 761;
            gridView1.Columns["Remark"].Caption = "备注";
            gridView1.Columns["Remark"].VisibleIndex = 799;
            gridView1.Columns["Code"].Caption = "备注2";
            gridView1.Columns["Code"].VisibleIndex = 798;

            gridView1.Columns["L1"].Caption = "台数";
            gridView1.Columns["L1"].VisibleIndex = 800;
            gridView1.Columns["L2"].Caption = "容量(MVA)";
            gridView1.Columns["L2"].VisibleIndex = 801;
            gridView1.Columns["L5"].Caption = "负荷率(%)";
            gridView1.Columns["L5"].Width = 100;
            gridView1.Columns["L5"].VisibleIndex = 804;
            gridView1.Columns["L6"].Caption = "最大负荷(MVA)";
            gridView1.Columns["L6"].VisibleIndex = 804;
            gridView1.Columns["L3"].Caption = "长度(KM)";
            gridView1.Columns["L3"].VisibleIndex = 802;
            gridView1.Columns["L4"].Caption = "型号";
            gridView1.Columns["L4"].VisibleIndex = 803;

            gridView1.Columns["Flag"].Visible = false;
            gridView1.Columns["Flag2"].Visible = false;
            gridView1.Columns["CreateTime"].Visible = false;
            gridView1.Columns["UpdateTime"].Visible = false;
            gridView1.Columns["IsConn"].Visible = false;
            title = this.ctrlPowerEachList1.FocusedObject.ListName;
            FileClass.ExportExcel(gridControl1);
        }
예제 #8
0
파일: Form1.cs 프로젝트: EdgarEDT/myitoppsp
 private void barButtonItem5_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.ctrlPowerEachList1.FocusedObject == null)
         return;
     FormClass fc = new FormClass();
     gridControl1.DataSource = fc.ConvertTreeListToDataTable(treeList1);
     gridView1.Columns["Title"].Caption = "项目名称";
     gridView1.Columns["Title"].VisibleIndex = 0;
     gridView1.Columns["Jingtai"].Caption = "静态总投资";
     gridView1.Columns["Jingtai"].VisibleIndex = 5000;
     gridView1.Columns["Lixi"].Caption = "建设期间代款利息";
     gridView1.Columns["Lixi"].Width = 120;
     gridView1.Columns["Lixi"].VisibleIndex = 5000;
     gridView1.Columns["Yubei"].Caption = "价格预备费";
     gridView1.Columns["Yubei"].VisibleIndex = 5000;
     gridView1.Columns["Dongtai"].Caption = "动态投资";
     gridView1.Columns["Dongtai"].VisibleIndex = 5000;
     gridView1.Columns["Flag"].Visible = false;
     gridView1.Columns["Flag2"].Visible = false;
     title = this.ctrlPowerEachList1.FocusedObject.ListName;
     FileClass.ExportExcel(gridControl1);
 }