/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRsasdetail(ref DataRow row, Rsasdetail entity) { row.SetField("inusety", entity.inusety); row.SetField("queuenm", entity.queuenm); row.SetField("jobnm", entity.jobnm); row.SetField("functionnm", entity.functionnm); row.SetField("startty", entity.startty); row.SetField("startdt", entity.startdt); row.SetField("starttmdisp", entity.starttmdisp); row.SetField("starttm", entity.starttm); row.SetField("lastrundt", entity.lastrundt); row.SetField("lastruntm", entity.lastruntm); row.SetField("cono", entity.cono); row.SetField("pidno", entity.pidno); row.SetField("transtm", entity.transtm); row.SetField("elapsed", entity.elapsed); row.SetField("rsesrowid", entity.rsesrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Rsasdetail BuildRsasdetailFromRow(DataRow row) { Rsasdetail entity = new Rsasdetail(); entity.inusety = row.IsNull("inusety") ? string.Empty : row.Field <string>("inusety"); entity.queuenm = row.IsNull("queuenm") ? string.Empty : row.Field <string>("queuenm"); entity.jobnm = row.IsNull("jobnm") ? string.Empty : row.Field <string>("jobnm"); entity.functionnm = row.IsNull("functionnm") ? string.Empty : row.Field <string>("functionnm"); entity.startty = row.IsNull("startty") ? string.Empty : row.Field <string>("startty"); entity.startdt = row.Field <DateTime?>("startdt"); entity.starttmdisp = row.IsNull("starttmdisp") ? string.Empty : row.Field <string>("starttmdisp"); entity.starttm = row.IsNull("starttm") ? 0 : row.Field <int>("starttm"); entity.lastrundt = row.Field <DateTime?>("lastrundt"); entity.lastruntm = row.IsNull("lastruntm") ? string.Empty : row.Field <string>("lastruntm"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.pidno = row.IsNull("pidno") ? 0 : row.Field <int>("pidno"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.elapsed = row.IsNull("elapsed") ? string.Empty : row.Field <string>("elapsed"); entity.rsesrowid = row.Field <byte[]>("rsesrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }