RcBuilder@walla.com
call centre: 054-5614020

custom DataTable

Posted by: RcBuilder  /   Category: abstract / ADO.NET / DataColumn / DataRow / DataTable / DefaultView / Entities / Generic T / inheritance / OOP / SOURCE CODE   /   No Comments
11
Jan
2015

custom DataTable namespace CSCode.DataTables { public abstract class baseDataTable { protected DataTable dataTable; public int RowsCount { get { return this.dataTable.Rows.Count; } } public void Sort(string SortColumn) { var view = this.dataTable.DefaultView; view.Sort = SortColumn; this.dataTable = view.ToTable(); } public void ReplaceString(string ColumnName, string OldValue, string NewValue) { foreach (DataRow row in this.dataTable.Rows) try { row.SetField<string>(ColumnName, row.ToString().Replace(OldValue, NewValue)); } catch { } } public object GetSpecificValue(int RowIndex, string ColumnName) { return this.dataTable.Rows; } public static explicit operator DataTable(baseDataTable me) { return me.dataTable; } public static.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים