public static Webnotecriteria BuildWebnotecriteriaFromRow(DataRow row) { Webnotecriteria entity = new Webnotecriteria(); entity.webnoteRowID = row.Field <byte[]>("webnoteRowID").ToStringEncoded(); entity.webnoteuserfield = row.IsNull("webnoteuserfield") ? string.Empty : row.Field <string>("webnoteuserfield"); 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 UpdateRowFromWebnotecriteria(ref DataRow row, Webnotecriteria entity) { row.SetField("webnoteRowID", entity.webnoteRowID.ToByteArray()); row.SetField("webnoteuserfield", entity.webnoteuserfield); row.SetField("userfield", entity.userfield); }