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


C# FarPoint.SetValue方法代码示例

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


在下文中一共展示了FarPoint.SetValue方法的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: 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

示例3: Build_Sheet

        public void Build_Sheet(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            //����������
            int[] TableYearsAry = TC.GetTableYears(this.GetType().Name);

            //���29 ��8 ��
            rowcount = 29;
            colcount = 2 + TableYearsAry.Length+1;
            //�������һ�еı���
            title = TC.GetTableTitle(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 = 150;

            //�趨����и߶�
            obj_sheet.Rows[0].Height = 20;
            obj_sheet.Rows[1].Height = 20;
            //���������

            //2�������
            obj_sheet.SetValue(1, 0, "����");
            obj_sheet.SetValue(1, 1, "ָ������");
            for (int i = 0; i < TableYearsAry.Length; i++)
            {
                obj_sheet.SetValue(1, 2 + i, TableYearsAry[i]);
                obj_sheet.Columns[2 + i].Width = 60;

            }

            obj_sheet.SetValue(1, 2 + TableYearsAry.Length, "���������(%)");
            obj_sheet.Columns[2 + TableYearsAry.Length].Width = 120;

            //���������

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

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

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

示例4: Build_Sheet

        public void Build_Sheet(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            //���5 ��7 ��
            rowcount = 5;
            colcount = 7;
            //�������һ�еı���
            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 = 80;
            obj_sheet.Columns[2].Width = 120;
            obj_sheet.Columns[3].Width = 80;
            obj_sheet.Columns[4].Width = 80;
            obj_sheet.Columns[5].Width = 80;
            obj_sheet.Columns[6].Width = 240;
            //�趨����и߶�
            obj_sheet.Rows[0].Height = 20;
            obj_sheet.Rows[1].Height = 20;
            //���������

            //2�������
            obj_sheet.SetValue(1, 0, "���");
            obj_sheet.SetValue(1, 1, "��������");
            obj_sheet.SetValue(1, 2, "����");
            obj_sheet.SetValue(1, 3, "�����ѹ");
            obj_sheet.SetValue(1, 4, "����");
            obj_sheet.SetValue(1, 5, "װ������");
            obj_sheet.SetValue(1, 6, "��ע");
            //���������

            //1�������

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

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

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

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

示例6: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            //写标题行内容

            //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, "电压等级(kV)");
            obj_sheet.AddSpanCell(1, 3, 2, 1);
            obj_sheet.SetValue(1, 3, "年限");
            obj_sheet.AddSpanCell(1, 4, 1, 2);
            obj_sheet.SetValue(1, 4, "主变台数");
            obj_sheet.AddSpanCell(1, 6, 1, 2);
            obj_sheet.SetValue(1, 6, "断路器");

            //3行标题内容
            obj_sheet.SetValue(2, 4, "数量(台)");
            obj_sheet.SetValue(2, 5, "比例(%)");
            obj_sheet.SetValue(2, 6, "数量(台)");
            obj_sheet.SetValue(2, 7, "比例(%)");
            //写标题列内容

            //1列标题内容
            obj_sheet.AddSpanCell(3, 0, 10, 1);
            obj_sheet.SetValue(3, 0, "1");
            obj_sheet.AddSpanCell(13, 0, 10, 1);
            obj_sheet.SetValue(13, 0, "2");
            obj_sheet.AddSpanCell(23, 0, 10, 1);
            obj_sheet.SetValue(23, 0, "2.1");
            obj_sheet.AddSpanCell(33, 0, 10, 1);
            obj_sheet.SetValue(33, 0, "2.2");
            obj_sheet.AddSpanCell(43, 0, 10, 1);
            obj_sheet.SetValue(43, 0, "2.3");
            obj_sheet.AddSpanCell(53, 0, 10, 1);
            obj_sheet.SetValue(53, 0, "2.4");
            obj_sheet.AddSpanCell(63, 0, 10, 1);
            obj_sheet.SetValue(63, 0, "3");

            //2列标题内容
            obj_sheet.AddSpanCell(3, 1, 10, 1);
            obj_sheet.SetValue(3, 1, "市辖供电区");
            obj_sheet.AddSpanCell(13, 1, 10, 1);
            obj_sheet.SetValue(13, 1, "县级供电区");
            obj_sheet.AddSpanCell(23, 1, 10, 1);
            obj_sheet.SetValue(23, 1, "其中:直供直管");
            obj_sheet.AddSpanCell(33, 1, 10, 1);
            obj_sheet.SetValue(33, 1, "控股");
            obj_sheet.AddSpanCell(43, 1, 10, 1);
            obj_sheet.SetValue(43, 1, "参股");
            obj_sheet.AddSpanCell(53, 1, 10, 1);
            obj_sheet.SetValue(53, 1, "代管");
            obj_sheet.AddSpanCell(63, 1, 10, 1);
            obj_sheet.SetValue(63, 1, "全地区");

            //偱环添加列标题
            for (int row = 3; row <= 72; row++)
            {
                obj_sheet.SetValue(row + 0, 3, "0-5年");
                obj_sheet.SetValue(row + 1, 3, "6-10年");
                obj_sheet.SetValue(row + 2, 3, "11-15年");
                obj_sheet.SetValue(row + 3, 3, "16-20年");
                obj_sheet.SetValue(row + 4, 3, "20年以上");
                obj_sheet.AddSpanCell(row + 0, 2, 5, 1);
                obj_sheet.SetValue(row + 0, 2, "110(66)");

                obj_sheet.SetValue(row + 5, 3, "0-5年");
                obj_sheet.SetValue(row + 6, 3, "6-10年");
                obj_sheet.SetValue(row + 7, 3, "11-15年");
                obj_sheet.SetValue(row + 8, 3, "16-20年");
                obj_sheet.SetValue(row + 9, 3, "20年以上");
                obj_sheet.AddSpanCell(row + 5, 2, 5, 1);
                obj_sheet.SetValue(row + 5, 2, "35");

                row = row + 9;
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:79,代码来源:Sheet38.cs

示例7: WriteData

 public void WriteData(FarPoint.Win.Spread.SheetView obj_sheet)
 {
     if (SDL320_21.Count != 0)
     {
         //市辖部分的行号
         int SXrow = fc.Sheet_Find_Value(obj_sheet, 0, "市辖供电区");
         //市辖供电区中第一行第二列的“合计”部分合并的行数就是电压等级数
         int newdysum = obj_sheet.Cells[SXrow, 1].RowSpan;
         for (int row = SXrow + newdysum; row < obj_sheet.RowCount; row++)
         {
             string dq = fc.Sheet_find_Rownotemptycell(obj_sheet, row, 0);
             string areaname = fc.Sheet_find_Rownotemptycell(obj_sheet, row, 1);
             string dy = obj_sheet.Cells[row, 2].Value.ToString();
             for (int i = 0; i < SDL320_21.Count; i++)
             {
                 if (dq == SDL320_21[i].DQ && areaname == SDL320_21[i].areaname && dy == SDL320_21[i].dy)
                 {
                     obj_sheet.SetValue(row, 3, SDL320_21[i].data);
                     SDL320_21.Remove(SDL320_21[i]);
                     break;
                 }
             }
         }
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:25,代码来源:Sheet320_21.cs

示例8: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet,Hashtable area_key_id, IList<double> 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, "电压等级(kV)");
            obj_sheet.SetValue(1, 3, "线路条数(条)");
            obj_sheet.SetValue(1, 4, "环网线路条数");
            obj_sheet.SetValue(1, 5, "双射线路条数");
            obj_sheet.SetValue(1, 6, "单射线路条数");
            obj_sheet.SetValue(1, 7, "其它结构线路条数");
            obj_sheet.SetValue(1, 8, "环网比例(%)");
            obj_sheet.SetValue(1, 9, "双射比例(%)");
            obj_sheet.SetValue(1, 10, "单射比例(%)");
            obj_sheet.SetValue(1, 11, "其它结构比例(%)");
            //写标题列内容
            fc.Sheet_AddItem_FBonlyDY(obj_sheet, area_key_id, 2, obj_DY_List, SXareaid_List, XJareaid_List);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:20,代码来源:Sheet312_10.cs

示例9: ComparisonData

 private void ComparisonData(FarPoint.Win.Spread.SheetView obj, int IntRow, int IntCol)
 {
     for (int i = IntRow; i < obj.RowCount; i += 2)//行从第IntRow行开始载入
     {
         for (int l = 0; l < SaveList.Count; ++l)
         {
             if ((SaveList[l].strType == PF.ReturnStr(obj, i, 0).ToString()) && (SaveList[l].strDQ == PF.ReturnStr(obj, i, 1).ToString()))
             {
                 for (int j = IntCol; j < obj.ColumnCount; ++j)//
                 {
                     obj.SetValue(i, j, SaveList[l].data[0, j - IntCol]);
                     obj.SetValue(i + 1, j, SaveList[l].data[1, j - IntCol]);
                 }
                 SaveList.Remove(SaveList[l]);
                 break;
             }
         }
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:19,代码来源:Sheet_8.cs

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

示例11: Sheet_AddItem

        private void Sheet_AddItem(FarPoint.Win.Spread.SheetView obj_sheet, List<string[]> SxXjName)
        {
            int startrow = 2;
            //2行标题内容
            obj_sheet.SetValue(1, 0, "编号");
            obj_sheet.SetValue(1, 1, "类型");
            obj_sheet.SetValue(1, 2, "2010年");
            obj_sheet.SetValue(1, 3, "2011年");
            obj_sheet.SetValue(1, 4, "2012年");
            obj_sheet.SetValue(1, 5, "2013年");
            obj_sheet.SetValue(1, 6, "2014年");
            obj_sheet.SetValue(1, 7, "2015年");
            obj_sheet.SetValue(1, 8, "2020年");
            //写标题列内容

            for (int i = 0; i < SxXjName.Count; i++)
            {
                obj_sheet.SetValue(startrow + i, 0, SxXjName[i][0]);
                obj_sheet.SetValue(startrow + i, 1, SxXjName[i][1]);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:21,代码来源:Sheet52.cs

示例12: SetSheet_2Title

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// 填写表头
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Title"></param>
        public void SetSheet_2Title(Itop.Client.Base.FormBase FB, FarPoint.Win.Spread.SheetView obj, string Title)
        {
            SelectDQ(FB);
            int IntColCount = 2;
            int IntRowCount =1+ AreaList.Count + 1 + 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);//画边线,居中
            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);
            //右对齐
            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

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

示例14: WriteData

        public void WriteData(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            int startrow = 3 + 8;
            int xjrow = fc.Sheet_Find_Value(obj_sheet, 0, "县级供电区");
            for (int row = startrow; row < xjrow; row++)
            {
                for (int k = 0; k < save91_52list.Count; k++)
                {
                    if (save91_52list[k].DQ=="市辖供电区"&&save91_52list[k].AreaName==fc.Sheet_find_Rownotemptycell(obj_sheet,row,1))
                    {
                        for (int i = 0; i < 8; i++)
                        {
                            for (int j = 0; j < 12; j++)
                            {
                              obj_sheet.SetValue(row + i, 5 + j,save91_52list[k].data[i,j]);
                            }
                        }
                        save91_52list.Remove(save91_52list[k]);
                        row = row + 7;
                        break;
                    }
                }

            }
            for (int row = xjrow + 8; row < obj_sheet.RowCount; row++)
            {
                for (int k = 0; k < save91_52list.Count; k++)
                {
                    if (save91_52list[k].DQ == "县级供电区" && save91_52list[k].AreaName == fc.Sheet_find_Rownotemptycell(obj_sheet, row, 1))
                    {
                        for (int i = 0; i < 8; i++)
                        {
                            for (int j = 0; j < 12; j++)
                            {
                                obj_sheet.SetValue(row + i, 5 + j, save91_52list[k].data[i, j]);
                            }
                        }
                        save91_52list.Remove(save91_52list[k]);
                        row = row + 7;
                        break;
                    }
                }
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:44,代码来源:Sheet91_52.cs

示例15: Build_Sheet

        public void Build_Sheet(FarPoint.Win.Spread.SheetView obj_sheet)
        {
            //���9 ��11 ��
            rowcount = 9;
            colcount = 11;
            //�������һ�еı���
            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 = 60;
            obj_sheet.Columns[3].Width = 60;
            obj_sheet.Columns[4].Width = 60;
            obj_sheet.Columns[5].Width = 60;
            obj_sheet.Columns[6].Width = 60;
            obj_sheet.Columns[7].Width = 60;
            obj_sheet.Columns[8].Width = 60;
            obj_sheet.Columns[9].Width = 60;
            obj_sheet.Columns[10].Width = 60;
            //�趨����и߶�
            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.SetValue(1, 0, "����");
            obj_sheet.SetValue(1, 1, "װ���������");
            obj_sheet.AddSpanCell(1, 2, 2, 1);
            obj_sheet.SetValue(1, 2, "<2");
            obj_sheet.AddSpanCell(1, 3, 2, 1);
            obj_sheet.SetValue(1, 3, "2~4");
            obj_sheet.AddSpanCell(1, 4, 2, 1);
            obj_sheet.SetValue(1, 4, "4~6");
            obj_sheet.AddSpanCell(1, 5, 2, 1);
            obj_sheet.SetValue(1, 5, "6~8");
            obj_sheet.AddSpanCell(1, 6, 2, 1);
            obj_sheet.SetValue(1, 6, "8~10");
            obj_sheet.AddSpanCell(1, 7, 2, 1);
            obj_sheet.SetValue(1, 7, "10~12");
            obj_sheet.AddSpanCell(1, 8, 2, 1);
            obj_sheet.SetValue(1, 8, "12~15");
            obj_sheet.AddSpanCell(1, 9, 2, 1);
            obj_sheet.SetValue(1, 9, ">15");
            obj_sheet.AddSpanCell(1, 10, 2, 1);
            obj_sheet.SetValue(1, 10, "�ϼ�");

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

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

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


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