コード例 #1
0
        //////////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.GridControl);
        }
コード例 #2
0
 private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     //FileClass.ExportExcel(this.gridControl1);
     FileClass.ExportExcel(this.gridView1.GroupPanelText, "汽了:嵐認欲扮 ", this.gridControl1);
 }
コード例 #3
0
 private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     FileClass.ExportExcel(this.ctrlProject_Sum1.GridControl);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     FileClass.ExportExcel(this.gridControl1);
 }
コード例 #6
0
ファイル: FrmPower.cs プロジェクト: github188/myitoppsp
        //////////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.ctrlPower1.GridView.GroupPanelText, "", this.ctrlPower1.GridControl);
        }