private void barButtonItem13_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.ctrlPowerEachTotalList1.FocusedObject == null) { return; } ctrlPowerEachTotal1.InitGrid(); title = this.ctrlPowerEachTotalList1.FocusedObject.ListName; //FileClass.ExportExcel(ctrlPowerEachTotal1.gridControl1); FileClass.ExportExcel(title, "", ctrlPowerEachTotal1.gridControl1); }
private void barButtonItem13_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.ctrlPowerProjectList1.FocusedObject == null) { return; } ctrlPowerProject1.InitGrid(); this.ctrlPowerProject1.gridControl1.Width = 2000; //this.ctrlPowerProject1.gridView1.OptionsView.ColumnAutoWidth = false; title = this.ctrlPowerProjectList1.FocusedObject.ListName; FileClass.ExportExcel(ctrlPowerProject1.gridControl1); }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { // System.Data.DataTable dt = dataTable.Clone(); // object[] obj = new object[dt.Columns.Count]; // for (int i = 0; i < dataTable.Rows.Count; i++) // { // dataTable.Rows[i].ItemArray.CopyTo(obj, 0); // dt.Rows.Add(obj); // } // dt.Columns.RemoveAt(2); // FileClass.ExportExcel(dt, this.bandedGridView1.GroupPanelText, false, true,false); //// ExportExcel(dt); FileClass.ExportExcel(this.bandedGridView1.GroupPanelText, "", this.gridControl1); }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //FileClass.ExportExcel(this.ctrlSubstation_Info1.GridView.GroupPanelText,"", this.ctrlSubstation_Info1.GridControl); this.ctrlSubstation_Info1.GridView.Bands[1].Visible = false; this.ctrlSubstation_Info1.GridView.Bands[3].Visible = false; this.ctrlSubstation_Info1.GridView.Bands[4].Visible = false; this.ctrlSubstation_Info1.GridView.Bands[5].Visible = false; this.ctrlSubstation_Info1.GridView.Bands[12].Visible = false; this.ctrlSubstation_Info1.GridView.Bands[13].Visible = false; FileClass.ExportExcel(this.ctrlSubstation_Info1.GridControl); this.ctrlSubstation_Info1.GridView.Bands[1].Visible = true; this.ctrlSubstation_Info1.GridView.Bands[3].Visible = true; this.ctrlSubstation_Info1.GridView.Bands[4].Visible = true; this.ctrlSubstation_Info1.GridView.Bands[5].Visible = true; this.ctrlSubstation_Info1.GridView.Bands[12].Visible = true; this.ctrlSubstation_Info1.GridView.Bands[13].Visible = true; }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FileClass.ExportExcel(this.ctrlLine_Info1.GridControl); }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //FileClass.ExportExcel(this.gridControl1); FileClass.ExportExcel(this.gridControl1.Text, "", this.gridControl1); }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //FileClass.ExportExcel(dataTable, this.bandedGridView1.GroupPanelText, false, true,false); FileClass.ExportExcel(this.bandedGridView1.GroupPanelText, "", this.gridControl1); }
//////////private void InitSodata1() //////////{ ////////// string sid = "1"; ////////// Hashtable hs = new Hashtable(); ////////// Hashtable hs2 = new Hashtable(); ////////// IList<LineInfo> listLineInfo = Services.BaseService.GetList<LineInfo>("SelectLineInfoByPowerID", sid); ////////// foreach (LineInfo l1 in listLineInfo) ////////// { ////////// hs.Add(Guid.NewGuid().ToString(), l1.UID); ////////// } ////////// IList<Line_Info> ll1 = Common.Services.BaseService.GetList<Line_Info>("SelectLine_InfoByFlag", sid); ////////// foreach (Line_Info ps in ll1) ////////// { ////////// hs2.Add(Guid.NewGuid().ToString(), ps.Code); ////////// } ////////// foreach (Line_Info p1 in ll1) ////////// { ////////// if (p1.Code != "" && !hs.ContainsValue(p1.Code)) ////////// { ////////// Services.BaseService.Delete<Line_Info>(p1); ////////// } ////////// } ////////// foreach (LineInfo l2 in listLineInfo) ////////// { ////////// if (!hs2.ContainsValue(l2.UID) && l2.Voltage != "") ////////// { ////////// //添加 ////////// try ////////// { ////////// Line_Info line1 = new Line_Info(); ////////// line1.DY = int.Parse(l2.Voltage.ToUpper().Replace("KV", "")); ////////// line1.Title = l2.LineName; ////////// line1.Code = l2.UID; ////////// line1.Flag = sid; ////////// Services.BaseService.Create<Line_Info>(line1); ////////// } ////////// catch { } ////////// } ////////// } //////////} //////////private void InitSodata2() //////////{ ////////// string sid = "1"; ////////// Hashtable hs1 = new Hashtable(); ////////// Hashtable hs3 = new Hashtable(); ////////// IList<substation> listsubstation = Services.BaseService.GetList<substation>("SelectsubstationByPowerIDStuff", sid); ////////// foreach (substation s1 in listsubstation) ////////// { ////////// hs1.Add(Guid.NewGuid().ToString(), s1.UID); ////////// } ////////// IList<PSP_PowerSubstationInfo> ll2 = Common.Services.BaseService.GetList<PSP_PowerSubstationInfo>("SelectSubstation_InfoByFlag", sid); ////////// foreach (PSP_PowerSubstationInfo ps in ll2) ////////// { ////////// hs3.Add(Guid.NewGuid().ToString(), ps.Code); ////////// } ////////// foreach (PSP_PowerSubstationInfo p2 in ll2) ////////// { ////////// if (p2.Code != "" && !hs1.ContainsValue(p2.Code)) ////////// { ////////// //删除 ////////// Services.BaseService.Delete<PSP_PowerSubstationInfo>(p2); ////////// } ////////// } ////////// foreach (substation s2 in listsubstation) ////////// { ////////// if (!hs3.ContainsValue(s2.UID) && s2.ObligateField1 != "") ////////// { ////////// //添加 ////////// try ////////// { ////////// PSP_PowerSubstationInfo substation1 = new PSP_PowerSubstationInfo(); ////////// substation1.L1 = int.Parse(s2.ObligateField1); ////////// substation1.Title = s2.EleName; ////////// substation1.Code = s2.UID; ////////// substation1.Flag = sid; ////////// try ////////// { ////////// substation1.L1 = int.Parse(s2.ObligateField1); ////////// } ////////// catch { } ////////// try ////////// { ////////// substation1.L10 = double.Parse(s2.ObligateField2); ////////// } ////////// catch { } ////////// try ////////// { ////////// substation1.L2 = Convert.ToDouble(s2.Number); ////////// } ////////// catch { } ////////// try ////////// { ////////// substation1.L9 = Convert.ToDouble(s2.Burthen); ////////// } ////////// catch { } ////////// Services.BaseService.Create<PSP_PowerSubstationInfo>(substation1); ////////// //PSP_PowerSubstationInfo substation1 = new PSP_PowerSubstationInfo(); ////////// //substation1.L1 = int.Parse(s2.ObligateField1); ////////// //substation1.Title = s2.EleName; ////////// //substation1.Code = s2.UID; ////////// //substation1.Flag = sid; ////////// //Services.BaseService.Create<PSP_PowerSubstationInfo>(substation1); ////////// } ////////// catch { } ////////// } ////////// } //////////} private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FileClass.ExportExcel(this.ctrlPSP_PowerSubstationInfo1.GridView.GroupPanelText, "", this.ctrlPSP_PowerSubstationInfo1.GridControl); }
private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //FileClass.ExportExcel(this.gridControl1); FileClass.ExportExcel(this.bandedGridView1.GroupPanelText, "汽了:嵐認欲扮", this.gridControl1); }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FileClass.ExportExcel(this.ctrlItemPlanTable_HuaiBei1.GridControl); }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //FileClass.ExportExcel(dataTable, this.ctrlBurdenMonth1.GridView.GroupPanelText, false, true, true); FileClass.ExportExcel(this.ctrlBurdenMonth1.GridView.GroupPanelText, "", this.ctrlBurdenMonth1.GridControl); }
private void barButtonItem7_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FileClass.ExportToExcelOld(ctrlBurdenLine1.GridView.GroupPanelText, "", ctrlBurdenLine1.GridControl); }