Exemplo n.º 1
0
 public static EnumerableRowCollection <TRow> WhereNotDeleted <TRow>(this TypedTableBase <TRow> source) where TRow : DataRow
 {
     return(TypedTableBaseExtensions.Where(source,
                                           d =>
                                           d.RowState != DataRowState.Deleted &&
                                           d.RowState != DataRowState.Detached));
 }
Exemplo n.º 2
0
 public static EnumerableRowCollection <TRow> WhereX <TRow>(this TypedTableBase <TRow> source, Func <TRow, bool> predicate) where TRow : DataRow
 {
     return(TypedTableBaseExtensions.Where(source,
                                           d =>
                                           d.RowState != DataRowState.Deleted &&
                                           d.RowState != DataRowState.Detached &&
                                           predicate(d)));
 }
Exemplo n.º 3
0
            private static List <PoliticianImagesInfo> ConvertTableToList(
                TypedTableBase <PoliticiansImagesDataRow> table)
            {
                var list = table.Select(row => new PoliticianImagesInfo
                {
                    PoliticianKey       = row.PoliticianKey,
                    ProfileOriginalDate = row.ProfileOriginalDate
                }).ToList();

                return(list);
            }
Exemplo n.º 4
0
 ///<summary>Gets the rows in a typed DataTable that have not been deleted.</summary>
 public static EnumerableRowCollection <TRow> CurrentRows <TRow>(this TypedTableBase <TRow> table) where TRow : DataRow
 {
     return(table.Where(r => r.RowState != DataRowState.Deleted));
 }
Exemplo n.º 5
0
 public static IActiveList <TDataRow> ToActiveList <TDataRow>(this TypedTableBase <TDataRow> table)
     where TDataRow : DataRow
 => new DataTableWrapper <TDataRow>(table);