/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSapjrptmgrs(ref DataRow row, Sapjrptmgrs entity) { row.SetField("queue_no", entity.queueNo); row.SetField("startdt", entity.startdt); row.SetField("starttm", entity.starttm); row.SetField("starttmdisp", entity.starttmdisp); row.SetField("rptsprocessed", entity.rptsprocessed); row.SetField("queue_status", entity.queueStatus); row.SetField("userinfo", entity.userinfo); row.SetField("lastrptname", entity.lastrptname); row.SetField("lastrptstartdt", entity.lastrptstartdt); row.SetField("lastrptstarttm", entity.lastrptstarttm); row.SetField("lasttmdisp", entity.lasttmdisp); row.SetField("clientlasttmdisp", entity.clientlasttmdisp); row.SetField("pid", entity.pid); row.SetField("pvsapbmrowid", entity.pvsapbmrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Sapjrptmgrs BuildSapjrptmgrsFromRow(DataRow row) { Sapjrptmgrs entity = new Sapjrptmgrs(); entity.queueNo = row.IsNull("queue_no") ? 0 : row.Field <int>("queue_no"); entity.startdt = row.Field <DateTime?>("startdt"); entity.starttm = row.IsNull("starttm") ? 0 : row.Field <int>("starttm"); entity.starttmdisp = row.IsNull("starttmdisp") ? string.Empty : row.Field <string>("starttmdisp"); entity.rptsprocessed = row.IsNull("rptsprocessed") ? 0 : row.Field <int>("rptsprocessed"); entity.queueStatus = row.IsNull("queue_status") ? string.Empty : row.Field <string>("queue_status"); entity.userinfo = row.IsNull("userinfo") ? string.Empty : row.Field <string>("userinfo"); entity.lastrptname = row.IsNull("lastrptname") ? string.Empty : row.Field <string>("lastrptname"); entity.lastrptstartdt = row.Field <DateTime?>("lastrptstartdt"); entity.lastrptstarttm = row.IsNull("lastrptstarttm") ? 0 : row.Field <int>("lastrptstarttm"); entity.lasttmdisp = row.IsNull("lasttmdisp") ? string.Empty : row.Field <string>("lasttmdisp"); entity.clientlasttmdisp = row.IsNull("clientlasttmdisp") ? string.Empty : row.Field <string>("clientlasttmdisp"); entity.pid = row.IsNull("pid") ? 0 : row.Field <int>("pid"); entity.pvsapbmrowid = row.Field <byte[]>("pvsapbmrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }