/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWtetprint(ref DataRow row, Wtetprint entity) { row.SetField("wtno", entity.wtno); row.SetField("wtsuf", entity.wtsuf); row.SetField("pickprintfl", entity.pickprintfl); row.SetField("printernm", entity.printernm); row.SetField("userfield", entity.userfield); }
public static Wtetprint BuildWtetprintFromRow(DataRow row) { Wtetprint entity = new Wtetprint(); entity.wtno = row.IsNull("wtno") ? 0 : row.Field <int>("wtno"); entity.wtsuf = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf"); entity.pickprintfl = row.Field <bool>("pickprintfl"); entity.printernm = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }