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


C# Row.Field方法代码示例

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


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

示例1: GetAffectedRows

        ///<summary>Gets the row(s) affected by a change in a row.</summary>
        ///<returns>The parent row of the child row that was changed.</returns>
        protected override IEnumerable<Row> GetAffectedRows(Row modifiedRow, Table owner)
        {
            if (modifiedRow == null) throw new ArgumentNullException("modifiedRow");

            //When a child row changes, its parent is affected,
            //unless the child row doesn't have a parent.
            var affectedRow = modifiedRow.Field<Row>(ChildRelation.ChildColumn);
            if (affectedRow != null)
                yield return affectedRow;
        }
开发者ID:ShomreiTorah,项目名称:Libraries,代码行数:12,代码来源:Concrete+Row+Dependencies.cs

示例2: PersonData

        ///<summary>Constructs a new PersonData from a Singularity Row.</summary>
        ///<param name="ykRow">Any ykRow with the standard set of fields.</param>
        public PersonData(Row row)
        {
            if (row == null)
                throw new ArgumentNullException("row");
            FullName = row.Field<string>("FullName");

            HisName = row.Field<string>("HisName");
            HerName = row.Field<string>("HerName");
            LastName = row.Field<string>("LastName");

            Address = row.Field<string>("Address");
            City = row.Field<string>("City");
            State = row.Field<string>("State");
            Zip = row.Field<string>("Zip");

            pPhone = row.Field<string>("Phone");
        }
开发者ID:ShomreiTorah,项目名称:Billing,代码行数:19,代码来源:PersonData.cs

示例3: GetColumnValue

        static object GetColumnValue(Row row, Column column)
        {
            var foreignKey = column as ForeignKeyColumn;

            if (foreignKey == null)
                return row[column];

            if (foreignKey.ForeignSchema.PrimaryKey == null)
                throw new InvalidOperationException("A foreign key column that references a table without a primary key cannot be saved to a SQL database");

            var foreignRow = row.Field<Row>(column);
            if (foreignRow == null) return null;
            return foreignRow[foreignKey.ForeignSchema.PrimaryKey];
        }
开发者ID:ShomreiTorah,项目名称:Libraries,代码行数:14,代码来源:SqlServerSqlProvider.cs


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