public static Pdspnpinitcriteria BuildPdspnpinitcriteriaFromRow(DataRow row) { Pdspnpinitcriteria entity = new Pdspnpinitcriteria(); entity.iRecNo = row.IsNull("iRecNo") ? 0 : row.Field <int>("iRecNo"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdspnpinitcriteria(ref DataRow row, Pdspnpinitcriteria entity) { row.SetField("iRecNo", entity.iRecNo); row.SetField("userfield", entity.userfield); }