/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSasselookupresults(ref DataRow row, Sasselookupresults entity) { row.SetField("errorno", entity.errorno); row.SetField("errormsg", entity.errormsg); row.SetField("bellfl", entity.bellfl); row.SetField("standardty", entity.standardty); row.SetField("trmgrlang", entity.trmgrlang); row.SetField("userfield", entity.userfield); }
public static Sasselookupresults BuildSasselookupresultsFromRow(DataRow row) { Sasselookupresults entity = new Sasselookupresults(); entity.errorno = row.IsNull("errorno") ? 0 : row.Field <int>("errorno"); entity.errormsg = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg"); entity.bellfl = row.Field <bool>("bellfl"); entity.standardty = row.IsNull("standardty") ? string.Empty : row.Field <string>("standardty"); entity.trmgrlang = row.IsNull("trmgrlang") ? string.Empty : row.Field <string>("trmgrlang"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }