/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSaealistreg(ref DataRow row, Saealistreg entity) { row.SetField("listtype", entity.listtype); row.SetField("listvalue", entity.listvalue); row.SetField("namedesc", entity.namedesc); row.SetField("reguser", entity.reguser); row.SetField("userfield", entity.userfield); }
public static Saealistreg BuildSaealistregFromRow(DataRow row) { Saealistreg entity = new Saealistreg(); entity.listtype = row.IsNull("listtype") ? string.Empty : row.Field <string>("listtype"); entity.listvalue = row.IsNull("listvalue") ? string.Empty : row.Field <string>("listvalue"); entity.namedesc = row.IsNull("namedesc") ? string.Empty : row.Field <string>("namedesc"); entity.reguser = row.IsNull("reguser") ? string.Empty : row.Field <string>("reguser"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }