zoukankan      html  css  js  c++  java
  • C# UpdateSearchedRows使用例子

    private void UpdateZJSize(string filename)

            {

                IFeatureClass pFeatureClass = OpenFeatureClass(filename);

                if (pFeatureClass == null)

                {

     

                    return;

                }

                int FontSizeidx = pFeatureClass.Fields.FindField("FontSize");

                if (FontSizeidx < -1)

                {

                    this.richTextBox1.Text += filename + "中可能不是注记字段\n";

                    return;

                }

                IQueryFilter pQueryFilter = new QueryFilterClass();

                for (int i = 0; i < oldList.Count; i++)

                {

     

                    pQueryFilter.WhereClause = "FontSize =" + oldList[i];

     

                    int num = pFeatureClass.FeatureCount(pQueryFilter);

                    if (num < 1)

                    {

                        this.richTextBox1.Text += filename + "" + oldList[i] + "没有," + num + "\n";

                        return;

                    }

     

     

                    ITable pTable = pFeatureClass as ITable;

                    IRowBuffer rowBuffer = pTable.CreateRowBuffer();

     

                    rowBuffer.set_Value(FontSizeidx, newList[i]);

     

     

     

                    pTable.UpdateSearchedRows(pQueryFilter, rowBuffer);//gisoracle

                    this.richTextBox1.Text += filename + "" + oldList[i] + "," + num + ",被修改为" + newList[i] + "\n";

     

                }

                System.Runtime.InteropServices.Marshal.ReleaseComObject(pQueryFilter);

            }

  • 相关阅读:
    Coding styles, code review
    Some links haven't take a look(C++, JS, IE9)
    前端学习,找到一下一些问题的答案
    Browser judgement
    Theme of Google
    Browser Time Line
    迷茫在10点左右……
    WebPageTest 检测web站点性能网站测试工具
    Invoke IFrame/window in cross domain in IE&FF notes
    [解决]多线程中出现由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达
  • 原文地址:https://www.cnblogs.com/gisoracle/p/1890352.html
Copyright © 2011-2022 走看看