当前位置: 首页>>代码示例>>C#>>正文


C# FarPoint.AddSpanCell方法代码示例

本文整理汇总了C#中FarPoint.AddSpanCell方法的典型用法代码示例。如果您正苦于以下问题:C# FarPoint.AddSpanCell方法的具体用法?C# FarPoint.AddSpanCell怎么用?C# FarPoint.AddSpanCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FarPoint的用法示例。


在下文中一共展示了FarPoint.AddSpanCell方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Build_Sheet

        public void Build_Sheet(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            //���8 ��6 ��
            rowcount = 8;
            colcount = 6;
            //�������һ�еı���
            title = TC.GetTableTitle(this.GetType().Name);
            //����������
            //int[] TableYearsAry = TC.GetTableYears(this.GetType().Name);
            //��������
            sheetname = title;
            //�趨����������ֵ������ͱ���
            TC.Sheet_RowCol_Title_Name(obj_sheet, rowcount, colcount, title, sheetname);
            //�趨����ģʽ���Ա�д��ʽʹ��
            TC.Sheet_Referen_R1C1(obj_sheet);
            //�趨����п��
            obj_sheet.Columns[0].Width = 60;
            obj_sheet.Columns[1].Width = 100;
            obj_sheet.Columns[2].Width = 100;
            obj_sheet.Columns[3].Width = 80;
            obj_sheet.Columns[4].Width = 100;
            obj_sheet.Columns[5].Width = 80;
            //�趨����и߶�
            obj_sheet.Rows[0].Height = 20;
            obj_sheet.Rows[1].Height = 20;
            obj_sheet.Rows[2].Height = 20;
            //���������

            //2�������
            obj_sheet.AddSpanCell(1, 0, 2, 1);
            obj_sheet.AddSpanCell(1, 1, 2, 1);
            obj_sheet.SetValue(1, 2, "������");
            obj_sheet.AddSpanCell(1, 3, 2, 1);
            obj_sheet.SetValue(1, 3, "�����ʣ�%��");
            obj_sheet.SetValue(1, 4, "���縺��");
            obj_sheet.AddSpanCell(1, 5, 2, 1);
            obj_sheet.SetValue(1, 5, "�����ʣ�%��");

            //3�������
            obj_sheet.SetValue(2, 2, "����ǧ��ʱ��");
            obj_sheet.SetValue(2, 4, "����ǧ�ߣ�");
            //���������

            //1�������
            obj_sheet.SetValue(3, 0, "1");

            //2�������
            obj_sheet.SetValue(3, 1, "ȫ��");

            //�������
            Sheet_AddData(obj_sheet);

            //�趨�����
            TC.Sheet_GridandCenter(obj_sheet);

            //�������
            TC.Sheet_Locked(obj_sheet);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:58,代码来源:Sheet221.cs

示例2: 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

示例3: AddItemsCol

        private void AddItemsCol(FarPoint.Win.Spread.SheetView obj_sheet, int[] TableYearsAry)
        {
            //int[] TableYearsAry = TC.GetTableYears(this.GetType().Name);
            for (int i = 0; i < TableYearsAry.Length; i++)
            {
                obj_sheet.SetValue(2, 6+i,TableYearsAry[i]);
            }

            obj_sheet.AddSpanCell(1, 6, 1, TableYearsAry.Length);
            obj_sheet.SetValue(1, 6, "Ͷ����ݺ�Ͷ����ģ");
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:11,代码来源:Sheet511.cs

示例4: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet,Hashtable area_key_id, IList<string> obj_DY_List, IList<string> SXareaid_List, IList<string> XJareaid_List)
        {
            //写标题行内容

            //2行标题内容
            obj_sheet.SetValue(1, 0, "分区类型");
            obj_sheet.SetValue(1, 1, "分区名称");
            obj_sheet.SetValue(1, 2, "低压线路类型");
            obj_sheet.SetValue(1, 3, "导线截面(mm2)");
            //写标题列内容
            int dylength = obj_DY_List.Count;

            int startrow = 2;
            for (int i = 0; i < (2 + SXareaid_List.Count + XJareaid_List.Count); i++)
            {
                string areaname = "";
                if (i == 0 || i == (SXareaid_List.Count + 1))
                {
                    areaname = "合计";
                }
                else
                {
                    if (i < SXareaid_List.Count + 1)
                    {
                        if (area_key_id[SXareaid_List[i - 1].ToString()] != null)
                        {
                            areaname = area_key_id[SXareaid_List[i - 1].ToString()].ToString();
                        }
                        else
                        {
                            areaname = "";
                        }

                    }
                    else
                    {
                        if (area_key_id[XJareaid_List[i - SXareaid_List.Count - 2].ToString()] != null)
                        {
                            areaname = area_key_id[XJareaid_List[i - SXareaid_List.Count - 2].ToString()].ToString();
                        }
                        else
                        {
                            areaname = "";
                        }
                    }
                }
                for (int j = 0; j < obj_DY_List.Count; j++)
                {
                    obj_sheet.SetValue(startrow + i * dylength + j, 2, obj_DY_List[j].ToString());
                }
                obj_sheet.AddSpanCell(startrow + i * dylength, 1, dylength, 1);
                obj_sheet.SetValue(startrow + i * dylength, 1, areaname);

            }
            //写第一列数据
            obj_sheet.AddSpanCell(startrow, 0, (SXareaid_List.Count + 1)*dylength, 1);
            obj_sheet.SetValue(startrow, 0, "市辖供电区");
            obj_sheet.AddSpanCell(startrow + (SXareaid_List.Count + 1) * dylength, 0, (XJareaid_List.Count + 1) * dylength, 1);
            obj_sheet.SetValue(startrow + (SXareaid_List.Count + 1) * dylength, 0, "县级供电区");
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:60,代码来源:Sheet320_21.cs

示例5: Sheet_AddData

        //�˴�Ϊ��̬������ݷ���
        private void Sheet_AddData(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            int startrow = 2;
            int addnum = 0;
            int itemcount = 0;
            int firstrow = 0;
            ArrayList rowsum = new ArrayList();
            Itop.Domain.PWTable.PW_tb3a p = new Itop.Domain.PWTable.PW_tb3a();
            p.col2 = Itop.Client.MIS.ProgUID;
            IList<PW_tb3a> alist = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aListDIS", p);

            for (int n = 0; n < alist.Count; n++)
            {
                for (int m = 0; m < 8; m++)
                {
                    obj_sheet.RowCount = obj_sheet.RowCount + 1;
                }

                obj_sheet.AddSpanCell(2, 0, 8, 1);
                obj_sheet.SetValue(2, 0, "XX�����أ�");

                //2�������
                obj_sheet.AddSpanCell(startrow+n * 8, 1, 6, 1);
                obj_sheet.SetValue(startrow + n * 8, 1, "���ͽ��ߣ��أ�");
                obj_sheet.AddSpanCell(startrow + (n + 1) * 8-1, 1, 1, 2);
                obj_sheet.SetValue(startrow + (n + 1) * 8-1, 1, "������");
                obj_sheet.AddSpanCell(startrow + (n + 1) * 8, 1, 1, 2);
                obj_sheet.SetValue(startrow + (n+1) * 8, 1, "�����ǵ��ͽ��ߣ��أ�");

                //3�������
                obj_sheet.SetValue(startrow + n * 8, 2, "����һ��");
                obj_sheet.SetValue(startrow + n * 8+1, 2, "����һ��");
                obj_sheet.SetValue(startrow + n * 8 + 2, 2, "������");
                obj_sheet.SetValue(startrow + n * 8 + 3, 2, "˫����");
                obj_sheet.SetValue(startrow + n * 8 + 4, 2, "��ֶ�������");
                obj_sheet.SetValue(startrow + n * 8 + 5, 2, "��ֶ�������");

                PW_tb3a _tba = alist[n];
                p.PQName = _tba.PQName;
                p.JXMS = "����һ��";
                IList<PW_tb3a> list1 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "����һ��";
                IList<PW_tb3a> list2 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "������";
                IList<PW_tb3a> list3 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "˫����";
                IList<PW_tb3a> list4 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "��ֶ�������";
                IList<PW_tb3a> list5 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "��ֶ�������";
                IList<PW_tb3a> list6 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "������";
                IList<PW_tb3a> list7 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                p.JXMS = "�����ǵ��ͽ���";
                IList<PW_tb3a> list8 = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2255", p);
                if (list1.Count > 0)
                {
                    PW_tb3a obj = list1[0];
                    obj_sheet.SetValue(n+startrow+n*7, 0, obj.PQName);
                    obj_sheet.SetValue(n+startrow+n*7, 3, obj.Num1);
                    obj_sheet.SetValue(n+startrow+n*7, 4, obj.Num2);
                    obj_sheet.SetValue(n+startrow+n*7, 5, obj.Num3);
                    obj_sheet.SetValue(n+startrow+n*7, 6, obj.Num4);
                    obj_sheet.SetValue(n+startrow+n*7, 7, obj.Num5);
                    obj_sheet.SetValue(n+startrow+n*7, 8, obj.Num6);
                    obj_sheet.SetValue(n+startrow+n*7, 9, obj.Num7);
                    obj_sheet.SetValue(n+startrow+n*7, 10, obj.Num8);
                }
                else
                {
                    TC.Sheet_WriteZero(obj_sheet, n + startrow+n*7,3,1,8);
                }
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:75,代码来源:Sheet2255.cs

示例6: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet, List<string[]> SxXjName, IList<string> obj_DY_List)
        {
            //写标题行内容

            //2行标题内容
            obj_sheet.SetValue(1, 0, "编号");
            obj_sheet.SetValue(1, 1, "类型");
            obj_sheet.SetValue(1, 2, "低压线路类型");
            obj_sheet.SetValue(1, 3, "导线截面(mm2)");
            //写标题列内容

            int startrow = 2;
            //添加列标题内容
            int dylength = obj_DY_List.Count;
            if (obj_DY_List.Count > 0)
            {
                for (int i = 0; i < SxXjName.Count; i++)
                {
                    for (int j = 0; j < obj_DY_List.Count; j++)
                    {
                        obj_sheet.SetValue(startrow + i * dylength + j, 2, obj_DY_List[j].ToString());
                    }
                    obj_sheet.AddSpanCell(startrow + i * dylength, 0, dylength, 1);
                    obj_sheet.SetValue(startrow + i * dylength, 0, SxXjName[i][0].ToString());
                    obj_sheet.AddSpanCell(startrow + i * dylength, 1, dylength, 1);
                    obj_sheet.SetValue(startrow + i * dylength, 1, SxXjName[i][1].ToString());
                }
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:29,代码来源:Sheet320.cs

示例7: Redraw

        /// <summary>
        /// 重绘
        /// </summary>
        /// <param name="obj"></param>
        private void Redraw(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, int BeginYear, int EndYear)
        {
            list = AddColumnTitle(BeginYear, EndYear);
            obj.RowCount = 0;
            obj.ColumnCount = 0;
            obj.ColumnCount = 1 + (EndYear - BeginYear + 1) + list.Count+1;

            SelectDQ(FB);
            int IntRowCount = 1+AreaList.Count + 1 + 2 + 3;//标题占3行,分区类型占2行,1是其它用
            string title = null;

            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

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

            string strTitle = "";
            IntRow = 3;
            strTitle = "附表2 铜陵县分镇/片区" + BeginYear + "~" + EndYear + "年人口状况表";
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, strTitle);
            PF.SetSheetViewColumnsWidth(obj, 0, strTitle);
            IntCol = 1;

            strTitle = "单位:万人、平方公里";
            obj.AddSpanCell(IntRow, 0, 1, obj.Columns.Count);
            obj.SetValue(IntRow, 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);

            strTitle = "面积";
            PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
            PF.SetSheetViewColumnsWidth(obj, IntCol, "60");
            for (int i = 0; i < AreaList.Count+1; ++i)
            {
                if(i!=AreaList.Count)
                {
                    PF.CreateSheetView(obj, 1, NextColMerge, (IntRow + i + 2), 0, AreaList[i].ToString());
                    PF.SetSheetViewColumnsWidth(obj, IntCol, AreaList[i].ToString());
                }
                else
                {
                    PF.CreateSheetView(obj, 1, NextColMerge, (IntRow + i + 2), 0, "合计");
                }
            }

            NextRowMerge = 1;
            NextColMerge = 1;

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

示例8: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet, IList<string> SXareaid_List, IList<string> XJareaid_List)
        {
            //写标题行内容

            //2行标题内容
            obj_sheet.AddSpanCell(1, 0, 2, 1);
            obj_sheet.SetValue(1, 0, "分区类型");
            obj_sheet.AddSpanCell(1, 1, 2, 1);
            obj_sheet.SetValue(1, 1, "分区名称");
            obj_sheet.AddSpanCell(1, 2, 2, 1);
            obj_sheet.SetValue(1, 2, "电压等级");
            obj_sheet.AddSpanCell(1, 3, 2, 1);
            obj_sheet.SetValue(1, 3, "建设型式");
            obj_sheet.AddSpanCell(1, 4, 2, 1);
            obj_sheet.SetValue(1, 4, "平均用地需求");
            obj_sheet.AddSpanCell(1, 5, 1, 2);
            obj_sheet.SetValue(1, 5, "2010年");
            obj_sheet.AddSpanCell(1, 7, 1, 2);
            obj_sheet.SetValue(1, 7, "2011年");
            obj_sheet.AddSpanCell(1, 9, 1, 2);
            obj_sheet.SetValue(1, 9, "2012年");
            obj_sheet.AddSpanCell(1, 11, 1, 2);
            obj_sheet.SetValue(1, 11, "2013年");
            obj_sheet.AddSpanCell(1, 13, 1, 2);
            obj_sheet.SetValue(1, 13, "2014年");
            obj_sheet.AddSpanCell(1, 15, 1, 2);
            obj_sheet.SetValue(1, 15, "2015年");
            obj_sheet.AddSpanCell(1, 17, 1, 2);
            obj_sheet.SetValue(1, 17, "“十二五”合计");

            //3行标题内容
            obj_sheet.SetValue(2, 5, "座数");
            obj_sheet.SetValue(2, 6, "用地需求");
            obj_sheet.SetValue(2, 7, "座数");
            obj_sheet.SetValue(2, 8, "用地需求");
            obj_sheet.SetValue(2, 9, "座数");
            obj_sheet.SetValue(2, 10, "用地需求");
            obj_sheet.SetValue(2, 11, "座数");
            obj_sheet.SetValue(2, 12, "用地需求");
            obj_sheet.SetValue(2, 13, "座数");
            obj_sheet.SetValue(2, 14, "用地需求");
            obj_sheet.SetValue(2, 15, "座数");
            obj_sheet.SetValue(2, 16, "用地需求");
            obj_sheet.SetValue(2, 17, "座数");
            obj_sheet.SetValue(2, 18, "用地需求");
            //写标题列内容

            //4列标题内容
            obj_sheet.SetValue(3, 3, "户外");
            obj_sheet.SetValue(4, 3, "半户内");
            obj_sheet.SetValue(5, 3, "户内");
            obj_sheet.SetValue(6, 3, "其它");
            //写标题列内容
            List<string> obj_DY_List = new List<string>();
            obj_DY_List.Add("110(66)");
            obj_DY_List.Add("35");

            int startrow = 3;
            int dylength = obj_DY_List.Count;
            int length = 4;

            if (obj_DY_List.Count > 0)
            {
                for (int i = 0; i < (2 + SXareaid_List.Count + XJareaid_List.Count); i++)
                {
                    string areaname = "";
                    if (i == 0 || i == (SXareaid_List.Count + 1))
                    {
                        areaname = "合计";
                    }
                    else
                    {
                        if (i < SXareaid_List.Count + 1)
                        {
                            areaname = SXareaid_List[i - 1].ToString();
                        }
                        else
                        {
                            areaname = XJareaid_List[i - SXareaid_List.Count - 2].ToString();
                        }
                    }
                    for (int j = 0; j < obj_DY_List.Count; j++)
                    {
                        int row = startrow + i * dylength * length + j * length;
                        obj_sheet.SetValue(row, 3, "户外");
                        obj_sheet.SetValue(row + 1, 3, "半户内");
                        obj_sheet.SetValue(row + 2, 3, "户内");
                        obj_sheet.SetValue(row + 3, 3, "其它");
                        obj_sheet.AddSpanCell(startrow + i * dylength * length + j * length, 2, length, 1);
                        obj_sheet.SetValue(startrow + i * dylength * length + j * length, 2, obj_DY_List[j].ToString());
                    }
                    obj_sheet.AddSpanCell(startrow + i * dylength * length, 1, dylength * length, 1);
                    obj_sheet.SetValue(startrow + i * dylength * length, 1, areaname);

                }
                //写第一列数据
                obj_sheet.AddSpanCell(startrow, 0, (SXareaid_List.Count + 1) * dylength * length, 1);
                obj_sheet.SetValue(startrow, 0, "市辖供电区");
                obj_sheet.AddSpanCell(startrow + (SXareaid_List.Count + 1) * dylength * length, 0, (XJareaid_List.Count + 1) * dylength * length, 1);
                obj_sheet.SetValue(startrow + (SXareaid_List.Count + 1) * dylength * length, 0, "县级供电区");
//.........这里部分代码省略.........
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:Sheet91_52.cs

示例9: Sheet_AddData

        //�˴�Ϊ��̬������ݷ���
        private void Sheet_AddData(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            int startrow = 3;
            int addnum = 0;
            int itemcount = 0;
            int firstrow = 0;
            string rowsum = "";
            string rowsum2 = "";
            Itop.Domain.PWTable.PW_tb3a p = new Itop.Domain.PWTable.PW_tb3a();
            p.col2 = Itop.Client.MIS.ProgUID;
            IList<PW_tb3a> list = Services.BaseService.GetList<PW_tb3a>("SelectPW_tb3aBy2254", p);

            bool sheetEnd = false;
            for (int i = 0; i < list.Count;i++ )
            {

                PW_tb3a obj = list[i];
                PW_tb3a obj2 = new PW_tb3a();
                if (i < list.Count - 1)
                {
                    obj2 = list[i + 1];
                }
                else
                {
                    sheetEnd = true;
                }
                decimal _sum = obj.Num1 + obj.Num2 + obj.Num3 + obj.Num4 + obj.Num5 + obj.Num6 + obj.Num7 + obj.Num8;
                itemcount = itemcount + 1;
                obj_sheet.RowCount = obj_sheet.RowCount + 1;
                obj_sheet.SetValue(i + addnum + startrow, 0, obj.PQName);
                obj_sheet.SetValue(i + addnum + startrow, 1, "��·�������أ�");
                obj_sheet.SetValue(i + addnum + startrow, 2, obj.Num1);
                obj_sheet.SetValue(i + addnum + startrow, 3, obj.Num2);
                obj_sheet.SetValue(i + addnum + startrow, 4, obj.Num3);
                obj_sheet.SetValue(i + addnum + startrow, 5, obj.Num4);
                obj_sheet.SetValue(i + addnum + startrow, 6, obj.Num5);
                obj_sheet.SetValue(i + addnum + startrow, 7, obj.Num6);
                obj_sheet.SetValue(i + addnum + startrow, 8, obj.Num7);
                obj_sheet.SetValue(i + addnum + startrow, 9, obj.Num8);
                obj_sheet.SetValue(i + addnum + startrow, 10, _sum);

                itemcount = itemcount + 1;
                addnum = addnum + 1;
                obj_sheet.RowCount = obj_sheet.RowCount + 1;
                obj_sheet.SetValue(i + addnum + startrow, 0, obj.PQName);
                obj_sheet.SetValue(i + addnum + startrow, 1, "��ռ������%��");
                if (_sum == 0)
                {
                    obj_sheet.SetValue(i + addnum + startrow, 2, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 3, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 4, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 5, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 6, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 7, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 8, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 9, "0");
                    obj_sheet.SetValue(i + addnum + startrow, 10, "0");
                }
                else
                {
                    obj_sheet.SetValue(i + addnum + startrow, 2, Convert.ToDecimal((obj.Num1 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 3, Convert.ToDecimal((obj.Num2 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 4, Convert.ToDecimal((obj.Num3 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 5, Convert.ToDecimal((obj.Num4 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 6, Convert.ToDecimal((obj.Num5 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 7, Convert.ToDecimal((obj.Num6 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 8, Convert.ToDecimal((obj.Num7 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 9, Convert.ToDecimal((obj.Num8 / _sum) * 100).ToString("0.##"));
                    obj_sheet.SetValue(i + addnum + startrow, 10, "100");
                }
                obj_sheet.AddSpanCell(i + addnum + startrow-1, 0, 2, 1);

                rowsum = rowsum + Convert.ToString(startrow-2+2*(i+1)) + ",";
                rowsum2 = rowsum2 + Convert.ToString(startrow - 1 + 2 * (i + 1)) + ",";
                if (sheetEnd)
                {
                    addnum = addnum + 1;
                    obj_sheet.RowCount = obj_sheet.RowCount + 1;
                    obj_sheet.SetValue(i + addnum + startrow, 0, "ȫ�кϼ�");
                    obj_sheet.SetValue(i + addnum + startrow, 1, "��·�������أ�");
                    TC.Sheet_WriteFormula_RowSum3(obj_sheet, TC.getRowList(rowsum), 2, i + addnum + startrow, 2, 9);
                    addnum = addnum + 1;
                    obj_sheet.RowCount = obj_sheet.RowCount + 1;
                    obj_sheet.SetValue(i + addnum + startrow, 0, "ȫ�кϼ�");
                    obj_sheet.SetValue(i + addnum + startrow, 1, "��ռ������%��");
                    //TC.Sheet_WriteFormula_TwoCol_Percent(obj_sheet, i + addnum + startrow - 1, 2, 7, 1, i + addnum + startrow, 2);
                    obj_sheet.SetValue(i + addnum + startrow, 10, "100");
                    obj_sheet.AddSpanCell(i + addnum + startrow-1, 0, 2, 1);
                }
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:92,代码来源:Sheet2254.cs

示例10: WriteData

        /// <summary>
        /// 写入数据
        /// </summary>
        /// <param name="FB"></param>
        /// <param name="obj"></param>
        /// <param name="IntRow"></param>
        private void WriteData(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj,int IntRow)
        {
            PSP_Substation_Info ppi = null;
            InitStruct();
            int index = 0;
            int indexCount = 0;
            int JH = 0;
            int inttemp = 0;
            string[] LRData = new string[2];//0,为*号左侧数据,1为*号右侧数据

            for (int i = IntRow; i < obj.RowCount; i += indexCount)
            {
                ppi = (PSP_Substation_Info)BDZList[index];
                if (ppi.L3 > 0)
                    indexCount = ppi.L3;
                else
                    indexCount = 1;
                for (int j = 0; j < obj.ColumnCount; ++j)
                {
                    switch (j)
                    {
                        case 0://变电站名称

                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.SetValue((i), j, ppi.Title);
                            index ++;
                            break;
                        case 1://主变容量
                            if(ppi.L4!="")
                            {
                                JH = ReturnJH(ppi.L4);//得到加号的数量

                                intercept.JHData = new string[ppi.L3];
                                ReturnJHOfData(ppi.L4);
                                for (int o = 0; o < ppi.L3; ++o)
                                {
                                    for (int n = 0; n < JH; ++n)
                                    {
                                        LRData = ReturnCHOfData(intercept.JHData[n]);
                                        obj.SetValue((i + n), j, LRData[1]);
                                    }
                                    if (JH < ppi.L3)
                                    {
                                        LRData = ReturnCHOfData(intercept.JHData[0]);
                                        obj.SetValue((i + o), j, LRData[1]);
                                    }
                                }
                                intercept.index = 0;
                            }

                            break;
                        case 2://10kV线路所带负荷

                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 3://需转供负荷
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Formula = "C" + (i + 1) + "-B" + (i + 1);
                            break;
                        case 4://联络的变电站
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 5://联络线路条数
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 6://联络线路能转带的负荷
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 7://联络变电站能转带的负荷

                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 8://通过联络可转带的负荷
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 9://通过主变能转带负荷

                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 10://需通过10kV网络转带负荷
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.Cells[i, j].Locked = false;
                            break;
                        case 11://是否通过
                            obj.AddSpanCell((i), j, indexCount, 1);
                            obj.SetValue(i, j, ppi.S1);
                            break;
//.........这里部分代码省略.........
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:Sheet23.cs

示例11: SetSheet_11Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_11Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            int IntColCount = 8;
            SelectedBDZ(FB);
            int IntRowCount =list.Count+1 + 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;
                    case 2:
                        strTitle = "  主变容量  ";
                        break;
                    case 3:
                        strTitle = "   N-1需转移的负荷 ";
                        break;
                    case 4:
                        strTitle = " 联络线路可转带负荷   ";
                        break;
                    case 5:
                        strTitle = "  主变能转带负荷  ";
                        break;
                    case 6:
                        strTitle = "  是否通过校验  ";
                        break;
                    case 7:
                        strTitle = "  损失负荷  ";
                        break;

                    default:
                        break;
                }
                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);//行高
            WriteData(FB, obj, IntRow);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:83,代码来源:Sheet11.cs

示例12: 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)
        {
            int IntColCount = 14;
            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;
                    case 2:
                        strTitle = "  出口导线型号  ";
                        break;
                    case 3:
                        strTitle = "   架空线长度 ";
                        break;
                    case 4:
                        strTitle = " 电缆线长度   ";
                        break;
                    case 5:
                        strTitle = " 线路总长度   ";
                        break;
                    case 6:
                        strTitle = "  主干线路长度  ";
                        break;
                    case 11:
                        strTitle = "  配变台数  ";
                        break;
                    case 12:
                        strTitle = " 配变容量  ";
                        break;
                    default:
                        break;
                }
                if(i==7)
                {
                    strTitle = "  公变  ";
                    PF.CreateSheetView(obj, 1, 2, IntRow, IntCol += 1, strTitle);
                    PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol , "台数");
                }
                else if(i==8)
                {
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol += 1, "容量");
                }
                else if(i==9)
                {
                    strTitle = "  专变  ";
                    PF.CreateSheetView(obj, 1, 2, IntRow, IntCol += 1, strTitle);
                    PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol, "台数");
                }
                else if(i==10)
                {
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol += 1, "容量");
                }
                else
                {
                    PF.CreateSheetView(obj, NextRowMerge, NextColMerge, IntRow, IntCol += 1, strTitle);
                    PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
                }
            }
//.........这里部分代码省略.........
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:Sheet6.cs

示例13: ReDraw

        /// <summary>
        /// 重绘
        /// </summary>
        /// <param name="FB"></param>
        /// <param name="obj"></param>
        /// <param name="strEndYear"></param>
        private void ReDraw(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string strEndYear)
        {
            int IntColCount = 14;
            int ColCount = 0;
            for(int i=0;i<BDZList.Count;++i)
            {
                ColCount += LineList[i].Count;
            }
            int IntRowCount = ColCount+1 + 2 + 3;//标题占3行,分区类型占2行

            obj.RowCount = 0;
            obj.ColumnCount = 0;
            obj.Columns.Count = IntColCount;
            obj.Rows.Count = IntRowCount;
            IntCol = obj.Columns.Count;

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

            string strTitle = "附表6 截至" + strEndYear + "年底铜陵县10kV线路基本情况";
            obj.SheetName = strTitle;
            IntRow = 3;
            PF.CreateSheetView(obj, IntRow, IntCol, 0, 0, strTitle);
            PF.SetSheetViewColumnsWidth(obj, 0, strTitle);
            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;
                    case 2:
                        strTitle = "  出口导线型号  ";
                        break;
                    case 3:
                        strTitle = "   架空线长度 ";
                        break;
                    case 4:
                        strTitle = " 电缆线长度   ";
                        break;
                    case 5:
                        strTitle = " 线路总长度   ";
                        break;
                    case 6:
                        strTitle = "  主干线路长度  ";
                        break;
                    case 11:
                        strTitle = "  配变台数  ";
                        break;
                    case 12:
                        strTitle = " 配变容量  ";
                        break;
                    default:
                        break;
                }
                if (i == 7)
                {
                    strTitle = "  公变  ";
                    PF.CreateSheetView(obj, 1, 2, IntRow, IntCol += 1, strTitle);
                    PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol, "台数");
                }
                else if (i == 8)
                {
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol += 1, "容量");
                }
                else if (i == 9)
                {
                    strTitle = "  专变  ";
                    PF.CreateSheetView(obj, 1, 2, IntRow, IntCol += 1, strTitle);
                    PF.SetSheetViewColumnsWidth(obj, IntCol, strTitle);
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol, "台数");
                }
                else if (i == 10)
                {
                    PF.CreateSheetView(obj, 1, 1, IntRow + 1, IntCol += 1, "容量");
                }
                else
//.........这里部分代码省略.........
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:Sheet6.cs

示例14: Sheet_RowCol_Title_Name

 /// <summary>
 /// ���ñ���������� SheetName���ϲ���һ�мӱ���
 /// </summary>
 /// <param name="obj_sheet"></param>
 /// <param name="rowcount">����</param>
 /// <param name="colcount">����</param>
 /// <param name="title">������</param>
 /// <param name="sheetname">������ǩ��</param>
 public void Sheet_RowCol_Title_Name(FarPoint.Win.Spread.SheetView obj_sheet, int rowcount, int colcount, string title, string sheetname)
 {
     obj_sheet.RowCount = rowcount;
     obj_sheet.ColumnCount = colcount;
     obj_sheet.SheetName = sheetname;
     obj_sheet.AddSpanCell(0, 0, 1, colcount);
     obj_sheet.SetValue(0, 0, title);
     obj_sheet.Rows[0].Height = 35;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:17,代码来源:fpcommon.cs

示例15: Sheet_AddItem_ZBonlyDY

 /// <summary>
 /// ������������������еĶ�̬��ѹ�б���
 /// </summary>
 /// <param name="obj_sheet"></param>
 /// <param name="SxXjName">��Ͻ�ؼ����Ƽ�����б�</param>
 /// <param name="startrow">��̬�б�����ʼ�к�</param>
 /// <param name="obj_DY_List">��̬��ѹ�б�</param>
 public void Sheet_AddItem_ZBonlyDY(FarPoint.Win.Spread.SheetView obj_sheet, List<string[]> SxXjName, int startrow, IList<double> obj_DY_List)
 {
     //����������
     int dylength = obj_DY_List.Count;
     if (obj_DY_List.Count > 0)
     {
         for (int i = 0; i < SxXjName.Count; i++)
         {
             for (int j = 0; j < obj_DY_List.Count; j++)
             {
                 obj_sheet.SetValue(startrow + i * dylength + j, 2, obj_DY_List[j].ToString());
             }
             obj_sheet.AddSpanCell(startrow + i * dylength, 0, dylength, 1);
             obj_sheet.SetValue(startrow + i * dylength, 0, SxXjName[i][0].ToString());
             obj_sheet.AddSpanCell(startrow + i * dylength, 1, dylength, 1);
             obj_sheet.SetValue(startrow + i * dylength, 1, SxXjName[i][1].ToString());
         }
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:26,代码来源:fpcommon.cs


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