/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSaealistprod(ref DataRow row, Saealistprod entity) { row.SetField("listtype", entity.listtype); row.SetField("listvalue", entity.listvalue); row.SetField("namedesc", entity.namedesc); row.SetField("produser", entity.produser); row.SetField("userfield", entity.userfield); }
public static Saealistprod BuildSaealistprodFromRow(DataRow row) { Saealistprod entity = new Saealistprod(); 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.produser = row.IsNull("produser") ? string.Empty : row.Field <string>("produser"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }