• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Itop类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Itop的典型用法代码示例。如果您正苦于以下问题:C# Itop类的具体用法?C# Itop怎么用?C# Itop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Itop类属于命名空间,在下文中一共展示了Itop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SelectEditChange

        /// <summary>
        /// 选中下拉菜单中的数据连接数据库表,方案
        /// </summary>
        /// <param name="BE"></param>
        public void SelectEditChange(FarPoint.Win.Spread.FpSpread  fPobj,FarPoint.Win.Spread.SheetView SheetView, object obj, Itop.Client.Base.FormBase FB)
        {
            string strID = null;
            //strTitle = obj.EditValue.ToString();
            strID=obj.ToString();
            Ps_forecast_list pfl = null;
            projectID = FB.ProjectUID;
            string con1 = "ID='" + strID + "' and UserID='" + projectID + "'";
            try
            {
                //查询下拉菜单所选中的数据
                pfl = (Ps_forecast_list)Services.BaseService.GetObject("SelectPs_forecast_listByWhere", con1);
                programID = pfl.ID;
                SetLeftTitle(SheetView, 5, 0);//左侧标题
                WriteData(SheetView, 5, 0);//数据
                S4_3.WriteData(fPobj,fPobj.Sheets[4], 5, 0);

                PF.Sheet_GridandCenter(SheetView);//画边线,居中
                S10_1.ColReadOnly(SheetView, SheetView.Columns.Count);
                PF.SetWholeRowHeight(SheetView, SheetView.Rows.Count, SheetView.Columns.Count);//行高
            }
            catch (System.Exception e)
            {
                //MessageBox.Show(e.Message);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:30,代码来源:Sheet4_2.cs


示例2: SetColumnsTitle

        /// <summary>
        /// 按照起始和结束年份写入列标题
        /// </summary>
        /// <param name="BeginYear"></param>
        /// <param name="EndYear"></param>
        public void SetColumnsTitle(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, int BeginYear, int EndYear,string CurrentYear)
        {
            int intTemp = BeginYear;
            Redraw(FB, obj, BeginYear, EndYear, CurrentYear);

            WriteData(FB, obj, CurrentYear);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:12,代码来源:Sheet3.cs


示例3: SelectEditChange

        /// <summary>
        /// 选中下拉菜单中的数据连接数据库表,方案
        /// </summary>
        /// <param name="BE"></param>
        public void SelectEditChange(FarPoint.Win.Spread.FpSpread fPobj,FarPoint.Win.Spread.SheetView SheetView, object obj, Itop.Client.Base.FormBase FB)
        {
            //string strTitle = null;
            string strID = obj.ToString();
            InitTitle();
            //Ps_forecast_list pfl = null;
            projectID = FB.ProjectUID;
            //string con1 = "Title='" + strTitle + "' and UserID='" + projectID + "'";
            try
            {
                //查询下拉菜单所选中的数据
                //pfl = (Ps_forecast_list)Services.BaseService.GetObject("SelectPs_forecast_listByWhere", con1);
                //programID = pfl.ID;
                programID = strID;
                CityID = SelectID(strID, AreaType[0]);//市辖
                CountyID = SelectID(strID, AreaType[1]);//县级
                SelectDQ(CityID, AreaType[0]);
                SelectDQ(CountyID, AreaType[1]);
                SetLeftTitle(SheetView, 5, 0);//左侧标题
                WriteData(fPobj,SheetView, 5, 0);//数据

                PF.Sheet_GridandCenter(SheetView);//画边线,居中
                S10_1.ColReadOnly(SheetView, SheetView.Columns.Count);
                PF.SetWholeRowHeight(SheetView, SheetView.Rows.Count, SheetView.Columns.Count);//行高
            }
            catch (System.Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:34,代码来源:Sheet4_4_1.cs


示例4: SetYears

        /// <summary>
        /// 设置年分
        /// </summary>
        ///<param name="FB">传入fromBase对象</param>
        /// <param name="obj">要传入SheetView对象</param>
        /// <param name="IntRow">行数</param>
        /// <param name="IntCol">列数</param>
        /// <param name="RowStep">要合并几个行的单元格</param>
        /// <param name="ColStep">要合并几个列的单元格</param>
        /// <param name="Title">标题</param>
        public void SetYears(string Title, Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, int IntRow, int IntCol, int RowStep, int ColStep)
        {
            GlobalFormBase = FB;
            Ps_YearRange py = new Ps_YearRange();
            py.Col4 = Title;
            py.Col5 = FB.ProjectUID;

            IList<Ps_YearRange> li = Services.BaseService.GetList<Ps_YearRange>("SelectPs_YearRangeByCol5andCol4", py);
            if (li.Count > 0)
            {
                GlobalFirstYear = li[0].StartYear;
                GlobalEndYear = li[0].FinishYear;
            }
            else
            {
                GlobalFirstYear = 2000;
                GlobalEndYear = 2009;
                py.BeginYear = 1990;
                py.FinishYear = GlobalEndYear;
                py.StartYear = GlobalFirstYear;
                py.EndYear = 2060;
                py.ID = Guid.NewGuid().ToString();
                Services.BaseService.Create<Ps_YearRange>(py);
            }
            GolobalYearCount = GlobalEndYear - GlobalFirstYear + FixationCol + 1;//后面有两个固定列,加1是起始年的加入
            SetYearsSheet2_1(FB, obj, GlobalFirstYear, GlobalEndYear, GolobalYearCount, IntRow, IntCol, RowStep, ColStep);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:37,代码来源:Sheet2_N.cs


示例5: SelectEditChange

 /// <summary>
 /// 选中下拉菜单中的数据连接数据库表,方案
 /// </summary>
 /// <param name="BE"></param>
 public void SelectEditChange(FarPoint.Win.Spread.SheetView SheetView, object obj, Itop.Client.Base.FormBase FB)
 {
     string strTitle = null;
     string strID = null;
     strID = obj.ToString();
     Ps_forecast_list pfl=null;
     string con1 = "ID='" + strID + "' and UserID='" + FB.ProjectUID + "'";
     try
     {
         //查询下拉菜单所选中的数据
         pfl = (Ps_forecast_list)Services.BaseService.GetObject("SelectPs_forecast_listByWhere", con1);
         strTitle = pfl.Title;
        //“十二五”电网投资(千瓦时/元)
        dTwelveFiveGridInvestment=TwelveFiveGridInvestment(pfl.ID, strTitle, FB);
        //(2015年网供最大负荷-2010年网供最大负荷)
        dNetworkMaxDuty=NetworkMaxDuty(pfl.ID, strTitle);
        //2015-2010年售电收入
        dSaleOfElectricity=SaleOfElectricity(pfl.ID, strTitle);
        //(电网2010年末资产原值+2015年电网年末资产原值)
        dInitialAssetValue=InitialAssetValue(pfl.ID, strTitle);
         //单年售电量
        dYearSaleEletricity=YearSaleEletricity(pfl.ID, strTitle, 2015);
        WriteData(SheetView, 5, 0);//数据
        }
     catch(System.Exception e)
     {
         //MessageBox.Show(e.Message);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:33,代码来源:Sheet10_11.cs


示例6: SetSheet_1Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_1Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title, bool IsTrue)
        {
            SelectValue(FB);
            int IntColCount = 5;
            int IntRowCount = list.Count + 2 + 3;//标题占3行,分区类型占2行,1是其它用
            string title = null;

            obj.SheetName = Title;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

            PF.Sheet_GridandCenter(obj);//画边线,居中
            S10_1.ColReadOnly(obj, IntColCount);
            //obj.OperationMode = FarPoint.Win.Spread.OperationMode.ReadOnly;

            string strTitle = "";
            IntRow = 3;
            strTitle = Title;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, Title);
            PF.SetSheetViewColumnsWidth(obj, 0, Title);
            IntCol = 1;

            strTitle = " 变电站名称";
            PF.CreateSheetView(obj, NextRowMerge += 1, NextColMerge, IntRow, IntCol -= 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 电压等级(kV)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 2012年";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 2015年";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "备     注";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            NextRowMerge = 1;
            NextColMerge = 1;

            IntRow = 5;
            IntCol = 0;
            SetLeftTitle(obj, IntRow, IntCol);
            if(!IsTrue)
            {
                WriteData(obj, IntRow, IntCol);
            }
            else//更新
            {
                ComparisonData(obj, 5, 2);
                WriteData(obj, IntRow, IntCol);
            }
            PF.SetWholeRowHeight(obj, obj.Rows.Count, obj.Columns.Count);//行高
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:66,代码来源:Sheet_1.cs


示例7: SetColumnsTitle

 /// <summary>
 /// 根据下拉菜单从新打印报表
 /// </summary>
 /// <param name="FB"></param>
 /// <param name="obj"></param>
 /// <param name="strEndYear"></param>
 public void SetColumnsTitle(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj,string strEndYear)
 {
     //查询变电站数据
     SelectBDZ(FB);
     SelectLine(FB,strEndYear,BDZList);
     //重绘
     ReDraw(FB,obj,strEndYear);
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:14,代码来源:Sheet6.cs


示例8: SetSheet_13Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_13Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            int IntColCount = 3;
            int IntRowCount = 6 + 2 + 3;//标题占3行,分区类型占2行
            string title = null;

            obj.SheetName = Title;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

            PF.Sheet_GridandCenter(obj);//画边线,居中
            m_PF.LockSheets(obj);

            string strTitle = "";
            IntRow = 3;
            strTitle = Title;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, Title);
            PF.SetSheetViewColumnsWidth(obj, 0, Title);
            IntCol = 1;

            strTitle = "单位:万千瓦 万千伏安 千伏 座 台";
            obj.AddSpanCell(IntRow, 0, 1, obj.Columns.Count);
            obj.SetValue(IntRow, 0, strTitle);
            PF.SetSheetViewColumnsWidth(obj, 0, strTitle);
            //右对齐
            obj.Rows[IntRow].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
            //列标题
            strTitle = "序号";
            PF.CreateSheetView(obj, NextRowMerge += 1, NextColMerge, IntRow += 1, IntCol -= 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            for (int i = 0; i < (IntColCount - 1); ++i)
            {
                switch (i)
                {
                    case 0:
                        strTitle = " 项                目   ";
                        break;
                    case 1:
                        strTitle = " 统计   ";
                        break;
                     default:
                        break;
                }
                PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
                PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
            }

            NextRowMerge = 1;
            NextColMerge = 1;

            IntRow = 5;
            IntCol = 0;
            //PF.SetWholeRowHeight(obj, obj.Rows.Count, obj.Columns.Count);//行高
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:62,代码来源:Sheet13.cs


示例9: AddBarEditItems

 /// <summary>
 /// add BareditItems of years
 /// </summary>
 /// <param name="BE">BarEditItem object</param>
 public void AddBarEditItems(DevExpress.XtraBars.BarEditItem BE, DevExpress.XtraBars.BarEditItem BE1, Itop.Client.Base.FormBase FB)
 {
     IList list = SelectProgramme(FB);
     Ps_forecast_list pfl = null;
     //BE.EditValue = "2000";
     for(int i=0;i<list.Count;++i)
     {
         pfl = (Ps_forecast_list)list[i];
         ((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)BE.Edit).Items.Add(pfl.Title);
         ((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)BE1.Edit).Items.Add(pfl.ID);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:16,代码来源:Sheet10_11.cs


示例10: PrintHelper

 public PrintHelper(ItopVectorControl tc, Itop.MapView.IMapViewObj map)
 {
     //int chose = Convert.ToInt32(ConfigurationSettings.AppSettings.Get("chose"));
     //if (chose == 1)
     //{ map = new Itop.MapView.MapViewObj(); }
     //else if (chose == 2)
     //{ map = new Itop.MapView.MapViewObj2(); }
     tlVectorControl1 = tc;
     mapview = map;
     pdoc = new PrintDocument();
     pdoc.PrintPage += new PrintPageEventHandler(pdoc_PrintPage);
     pageSetting = pdoc.PrinterSettings.DefaultPageSettings;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:13,代码来源:PrintHelper.cs


示例11: AddLookUpEditValue

 /// <summary>
 /// 这个是用lookupEdit控件的方法现在没有用这个控件
 /// </summary>
 /// <param name="LE"></param>
 /// <param name="FB"></param>
 public void AddLookUpEditValue(DevExpress.XtraEditors.LookUpEdit LE, Itop.Client.Base.FormBase FB)
 {
     IList list = SelectProgramme(FB);
     Ps_forecast_list pfl = null;
     LE.EditValue = list;
     //BE.EditValue = "2000";
     //for (int i = 0; i < list.Count; ++i)
     //{
     //    pfl = (Ps_forecast_list)list[i];
     //    LE.EditValue = pfl;
     //    //((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)LE.EditValue).Items.Add(pfl.Title);
     //}
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:18,代码来源:Sheet4_2_1.cs


示例12: SetSheet_8Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_8Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            int IntColCount = 1;
            int IntRowCount = 6 + 2 + 3;//标题占3行,分区类型占2行
            string title = null;

            obj.SheetName = Title;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

            PF.Sheet_GridandCenter(obj);//画边线,居中
            m_PF.LockSheets(obj);

            string strTitle = "";
            IntRow = 3;
            strTitle = Title;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, Title);
            PF.SetSheetViewColumnsWidth(obj, 0, Title);
            IntCol = 1;

            strTitle = "单位:条";
            obj.AddSpanCell(IntRow, 0, 1, obj.Columns.Count);
            obj.SetValue(IntRow, 0, strTitle);
            PF.SetSheetViewColumnsWidth(obj, 0, strTitle);
            //右对齐
            obj.Rows[IntRow].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
            //列标题
            strTitle = "     变  电  站     ";
            PF.CreateSheetView(obj, NextRowMerge += 1, NextColMerge, IntRow += 1, IntCol -= 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            NextRowMerge = 1;
            NextColMerge = 1;

            IntRow = 5;
            IntCol = 0;
            //PF.SetWholeRowHeight(obj, obj.Rows.Count, obj.Columns.Count);//行高
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:45,代码来源:Sheet8.cs


示例13: SelectCurrentData

 /// <summary>
 /// 找到当前列的数据
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="CurrentYear">列标题包括(当前年份,土地面积)</param>
 /// <param name="strTitle">指标名称</param>
 private object SelectCurrentData(Itop.Client.Base.FormBase FB, string CurrentYear, string strTitle,string BeginYear)
 {
     string sql = null;
     string sql1 = null;
     string ID = null;
     object value = 0;
     //先找到地区的id
     sql = " ProjectId='" + FB.ProjectUID + "' and Area='" + strTitle + "'";
     try
     {
         ID = (string)Services.BaseService.GetObject("SelectAreaDataOfID", sql);
     }
     catch (System.Exception e)
     {
         MessageBox.Show(e.Message);
     }
     if(CurrentYear=="面积")
     {
         sql1 = "select TotalArea from ps_table_AreaData where parentId='" + ID + "' and ProjectId='" + FB.ProjectUID + "' and yearf='" + BeginYear + "'";
     }
     else
     {
         sql1 = "select population from ps_table_AreaData where parentId='" + ID + "' and ProjectId='" + FB.ProjectUID + "' and yearf='" + CurrentYear + "'";
     }
     try
     {
         value = (double)Services.BaseService.GetObject("SelectAreaDataOfCurrent", sql1);
     }
     catch (Exception e)
     {
         //MessageBox.Show("错误,错误原因:"+ e.Message,"提示错误",MessageBoxButtons.OK,MessageBoxIcon.Information);
     }
     return value;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:40,代码来源:Sheet2.cs


示例14: SelectProgramme

 /// <summary>
 /// 查询方案内容,给下拉菜单用
 /// </summary>
 private IList SelectProgramme(Itop.Client.Base.FormBase FB)
 {
     IList Programme = null;//方案
     //Ps_forecast_list report = new Ps_forecast_list();
     //report.UserID =FB. ProjectUID;
     Programme = Services.BaseService.GetList("SelectPs_forecast_listByUserID", FB.ProjectUID);
     return Programme;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:11,代码来源:Sheet4_2_1.cs


示例15: SetSheet_6Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_6Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            SelectLine(FB, strYear);
            int IntColCount = 14;
            int IntRowCount = list.Count + 2 + 3;//标题占3行,分区类型占2行,1是其它用
            string title = null;

            obj.SheetName = Title;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

            PF.Sheet_GridandCenter(obj);//画边线,居中
            S10_1.ColReadOnly(obj, IntColCount);
            //obj.OperationMode = FarPoint.Win.Spread.OperationMode.ReadOnly;

            string strTitle = "";
            IntRow = 3;
            strTitle = Title;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, Title);
            PF.SetSheetViewColumnsWidth(obj, 0, Title);
            IntCol = 1;

            strTitle = " 序     号";
            PF.CreateSheetView(obj, NextRowMerge += 1, NextColMerge, IntRow, IntCol -= 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 中压线路名";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 变电站名";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 电压等级(kV) ";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "线路属性";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 干线长度(km)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 线路总长度(km)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 电缆线路长度(km)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 架空线路长度(km)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 主干线型号";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 架设方式";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 最大电流(A)";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 线路投运时间";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = " 线路停运时间";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            NextRowMerge = 1;
            NextColMerge = 1;

            IntRow = 5;
            IntCol = 0;

            WriteData(FB, obj, IntRow, IntCol);
            PF.SetWholeRowHeight(obj, obj.Rows.Count, obj.Columns.Count);//行高
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:94,代码来源:Sheet_6.cs


示例16: WriteData

 /// <summary>
 /// 写入数据
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="IntRow"></param>
 /// <param name="IntCol"></param>
 private void WriteData(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, int IntRow, int IntCol)
 {
     PSPDEV psDev = null;
     Object Value = null;
     for (int i = 0; i < list.Count; ++i)
     {
         psDev = (PSPDEV)list[i];
         SelectBDZ(FB, psDev.Name);
         for (int j = 0; j < obj.ColumnCount; ++j)
         {
             switch (j)
             {
                 case 0:
                     Value = i + 1;//序号
                     break;
                 case 1:
                     Value = psDev.Name;//中压线路名
                     break;
                 case 2:
                     if (BDZ == null)
                     {
                         Value = "";//BDZ1.Title;
                     }
                     else if (BDZ1 == null)
                     {
                         Value = "";// BDZ.Title;
                     }
                     else
                     {
                         Value = BDZ.Title + "," + BDZ1.Title;//变电站名
                     } break;
                 case 3:
                     Value = psDev.RateVolt;//电压等级(kV)
                     break;
                 case 4:
                     Value = psDev.LineType2;//线路属性
                     break;
                 case 5://***************************************
                    //干线长度(km)(A),手写
                     break;
                 case 6:
                     Value = psDev.Length2 + psDev.LineLength;//线路总长度(km)
                          break;
                 case 7:
                     Value = psDev.Length2;//电缆线路长度(km)
                      break;
                 case 8:
                     Value = psDev.LineLength;//架空线路长度(km)
                     break;
                 case 9:
                     Value = psDev.LineType;//主干线型号
                     break;
                 case 10:
                     if (psDev.LineLength > psDev.Length2)
                         Value = "架空";//架设方式
                     else
                         Value = "电缆";
                     break;
                 case 11:
                     Value = psDev.Burthen * 1000;//最大电流(A)
                     break;
                 case 12:
                     Value =psDev.OperationYear;//线路投运时间
                     break;
                 default:
                     break;
             }
             if(j==obj.ColumnCount-1||j==5)
             {
                 obj.Cells[IntRow + i, j].Locked = false;
             }
             else
             {
                 obj.SetValue(IntRow + i, j, Value);//
             }
         }
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:84,代码来源:Sheet_6.cs


示例17: SelectLine

 /// <summary>
 /// 寻找线路所有数据
 /// </summary>
 private void SelectLine(Itop.Client.Base.FormBase FB, string year)
 {
     string con = " where IName!=''and JName!=''and RateVolt<'35' and Type='05'  and ProjectID='" + FB.ProjectUID + "' and OperationYear <='" + year + "'";
     try
     {
         list = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
     }
     catch (System.Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:15,代码来源:Sheet_6.cs


示例18: SelectBDZ

 /// <summary>
 /// 查询变电站数据
 /// </summary>
 private void SelectBDZ(Itop.Client.Base.FormBase FB, string strName)
 {
     string sql = " AreaID='" + FB.ProjectUID + "'and uid in(select svguid from pspDEV where  ProjectID='" + FB.ProjectUID + "' and  Type='01'and Name in(select JName from pspdev where Name='" + strName + "'))";
     string sql1 = " AreaID='" + FB.ProjectUID + "'and uid in(select svguid from pspDEV where  ProjectID='" + FB.ProjectUID + "' and  Type='01'and Name in(select IName from pspdev where Name='" + strName + "'))";
     try
     {
         BDZ = (PSP_Substation_Info)Services.BaseService.GetObject("SelectPSP_Substation_InfoListByWhere", sql);
         BDZ1 = (PSP_Substation_Info)Services.BaseService.GetObject("SelectPSP_Substation_InfoListByWhere", sql1);
     }
     catch (System.Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:17,代码来源:Sheet_6.cs


示例19: SetSheet_25Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_25Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            int Temp = 0;
            int IntColCount = 6;
            SelectData(FB);
            int IntRowCount = HList.Count+Llist.Count+1 + 2 + 3;//标题占3行,分区类型占2行

            int BringIntoPproductionTime = 6;//投产时间的列数

            string title = null;

            obj.SheetName = Title;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

            PF.Sheet_GridandCenter(obj);//画边线,居中
            m_PF.LockSheets(obj);

            string strTitle = "";
            IntRow = 3;
            strTitle = Title;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, Title);
            PF.SetSheetViewColumnsWidth(obj, 0, Title);
            IntCol = 1;

            strTitle = "  单位:亿元";
            obj.AddSpanCell(IntRow, 0, 1, obj.Columns.Count);
            obj.SetValue(IntRow, 0, strTitle);
            PF.SetSheetViewColumnsWidth(obj, 0, strTitle);
            //右对齐

            obj.Rows[IntRow].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
            //列标题

            IntRow = 4;
            strTitle = "序     号";
            PF.CreateSheetView(obj, NextRowMerge += 1, NextColMerge, IntRow, IntCol -= 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "项     目";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "项目性质";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "建设年限";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "建设内容";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            strTitle = "资     金";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);

            NextRowMerge = 1;
            NextColMerge = 1;

            IntRow = 6;
            IntCol = 0;
            //PF.SetWholeRowHeight(obj, obj.Rows.Count, obj.Columns.Count);//行高
            //SetLeftTitle();
            WriteData(obj,IntRow);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:75,代码来源:Sheet25.cs


示例20: SelectData

 /// <summary>
 /// 查询 高压 ,中低压数据 
 /// </summary>
 /// <param name="FB"></param>
 private void SelectData(Itop.Client.Base.FormBase FB)
 {
     string sql = "select a.* FROM Ps_Table_TZGS a,Ps_Table_TZGS b,Ps_Table_TZGS c,Ps_Table_TZGS d"
                 + "  where  a.ID = b.ParentID AND b.Col4 = 'pw-line'"
                 + "  AND a.ID = c.ParentID AND c.Col4 = 'pw-pb'"
                 + "  and a.ID = d.ParentID AND d.Col4 = 'pw-kg'"
                 + "    and a.ProjectID='"+FB.ProjectUID+"'"
                 + "    and a.BuildEd between '2010' and '2015'";
     string sql1 = "Select a.*  FROM  Ps_Table_TZGS a INNER JOIN"
                  +" Ps_Table_TZGS b ON a.ID = b.ParentID INNER JOIN"
                  +" Ps_Table_TZGS c ON a.ID = c.ParentID"
                  +" where b.Col4 = 'bian' and c.Col4='line'and "
                  + "   a.ProjectID='" + FB.ProjectUID + "'and a.BuildEd between '2010' and '2015'";
     try
     {
         Llist = Services.BaseService.GetList("SelectTZGSEveryField", sql);//低压数据
         HList = Services.BaseService.GetList("SelectTZGSEveryField", sql1);//高压数据
     }
     catch (System.Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:27,代码来源:Sheet25.cs



注:本文中的Itop类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# JArray类代码示例发布时间:2022-05-24
下一篇:
C# Iterator类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap