/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcamrupdselectmethod(ref DataRow row, Icamrupdselectmethod entity) { row.SetField("cono", entity.cono); row.SetField("reportno", entity.reportno); row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("icamapRowID", entity.icamapRowID.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Icamrupdselectmethod BuildIcamrupdselectmethodFromRow(DataRow row) { Icamrupdselectmethod entity = new Icamrupdselectmethod(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.icamapRowID = row.Field <byte[]>("icamapRowID").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }