public static Altloccriteria BuildAltloccriteriaFromRow(DataRow row) { Altloccriteria entity = new Altloccriteria(); entity.binmstRowID = row.Field <byte[]>("binmstRowID").ToStringEncoded(); entity.altlocuserfield = row.IsNull("altlocuserfield") ? string.Empty : row.Field <string>("altlocuserfield"); 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 UpdateRowFromAltloccriteria(ref DataRow row, Altloccriteria entity) { row.SetField("binmstRowID", entity.binmstRowID.ToByteArray()); row.SetField("altlocuserfield", entity.altlocuserfield); row.SetField("userfield", entity.userfield); }